Re: [patch] latency tracer, 2.6.15-rc7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Sun, 1 Jan 2006, Lee Revell wrote:
> In fact neither of these patches helps, because these RCU callbacks run
> from a tasklet in softirq context, and softirqs are not preemptible
> (unless they are running in threads, see below):

That wasn't why I was hoping they would help..

The actual RCU callback will run uninterruptible, but I was hoping that 
the patch would make it be called more often, and not have thousands of 
events to work on...

> Linus, would you accept CONFIG_PREEMPT_SOFTIRQS to always run softirqs
> in threads (default N of course, it certainly has a slight throughput
> cost) for mainline if Ingo were to submit it?

Actually, I think there's a better solution.

Try just setting maxbatch back to 10 in kernel/rcupdate.c.

The thing is, "maxbatch" doesn't actually _work_ because what happens is 
that the tasklet will continually re-schedule itself, and the caller will 
keep calling it. So maxbatch is actually broken.

However, what happens is that after kernel/softirq.c has called the 
tasklet ten times, and it is still pending, it will do the softirq in a 
thread (see the "max_restart" logic).

Which happens to do the right thing, although I'm pretty convinced that it 
was by mistake (or if on purpose, it depends way too closely on silly 
magic implementation issues).

I raised maxbatch because the dentry RCU problem (since fixed) was 
reported to become less (probably because the scheduling of the softirq's 
delayed the freeing of old dentries further, making the problem worse), 
and because I don't like the subtlety involved in having two layers of 
batching. But hey, it might work, at which point we should just document 
how maxbatch and max_restart interact with each other and with softirqd.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at
Please read the FAQ at

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux