Ingo Molnar wrote: >>below i've also attached a softirq.c patch against 2.6.8-rc2 that does >>unconditional deferring. (this patch is of course not intended to be >>merged upstream as-is, since normally we want to process softirqs >>right after the irq context.) > > > i've got a more complete patch against vanilla 2.6.8-rc2: > > http://redhat.com/~mingo/voluntary-preempt/defer-softirqs-2.6.8-rc2-A2 > > which introduces the following tunable: > > /proc/sys/kernel/defer_softirqs (default: 0) > > this, if enabled, causes all softirqs to be processed within ksoftirqd, > and it also breaks out of the softirq loop if preemption of ksoftirqd > has been triggered by a higher-prio task. > > I've also added this additional break-out to the -H6 patch of > voluntary-preempt: > > http://redhat.com/~mingo/voluntary-preempt/voluntary-preempt-2.6.8-rc2-H6 > > it's enabled by default. > What do you think about deferring softirqs just while in critical sections? I'm not sure how well this works, and it is CONFIG_PREEMPT only but in theory it should prevent unbounded softirqs while under locks without taking the performance hit of doing the context switch.