softirq-2.4.5-B0
Quoted 6 lines · David S. Miller
Quoted 3 lines
the attached softirq-2.4.5-B0 patch fixes this problem by calling
do_softirq()fromlocal_bh_enable()[if the bh count is 0, to avoid recursion].Yikes! I do not like this fix.
Quoted 7 lines
I'd rather
local_bh_enable()not become a more heavy primitive.I know, in one respect it makes sense because it parallels how hardware interrupts work, but not this thing is a function call instead of a counter bump :-(
Any other ideas how to zap this?
I think the right way to fix it is to do a final atomic check for softirqs when the kernel is exited. To be atomic this check neededs to be done with interrupts off until the kernel exited. I just implemented a very similar way into the x86-64 kernel (which needs to turn off interrupts for kernel anyways for other reasons, this just extends the cli area a bit). The same atomic check is needed for race free check of need_schedule (which is still racy on plain i386).
-Andi
Quoted 3 lines · Andi Kleen
I think the right way to fix it is to do a final atomic check for softirqs when the kernel is exited. To be atomic this check neededs to be done with interrupts off until the kernel exited. [...]
check out my first softirq patch, it does exactly this. (but has the wrong explanation.)
Quoted 2 lines
[...] The same atomic check is needed for race free check of
need_schedule(which is still racy on plain i386).
right, this need_resched race is fixed in the lowlatency patchset.
Ingo