On Sun, Jan 01, 2006 at 10:56:25AM -0800, Linus Torvalds wrote:
>
> > 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.
Not really. maxbatch limits the number of RCU callbacks in a
batch inside RCU subsystem, it doesn't assure that total number
of RCU callbacks invoked in that instance of softirq would
be maxbatch. The idea was to give the control back to softirq
subsystem after maxbatch RCUs are processed and let the softirq
latency logic take over.
> 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).
It was intentional. I wanted to keep the RCU throttling separate
and let softirq handling do its own thing. Softirqs, once delegated
to ksoftirqd were managable from the latency perspective, but
not a very long RCU batch.
I do agree that the two layers of batching really makes things
subtle. I think the best we can do is to figure out some way of
automatic throttling in RCU and forced quiescent state under extreme
conditions. That way we will have less dependency on softirq
throttling.
Thanks
Dipankar
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[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]