[lkml]   [2006]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] latency tracer, 2.6.15-rc7

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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2009-11-18 23:46    [W:0.178 / U:2.136 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site