On Thu, Nov 27, 2014 at 1:38 AM, Matt Thomas <[email protected]> wrote: > That is not true. If the softint thread sleeps, control is returned back > to the preempted lwp.
You're right. I keep forgetting how softint works. Sigh. - Generic soft interrupt is implemented as kthread, and is not preemptive. No chance to be executed during critical sections. - "Fast" soft interrupt is called from MD interrupt dispatch code, that switches stack onto on per-CPU, per-interrupt-level pre-allocated thread (LWP) to execute soft interrupts. - When these soft interrupts block and enter scheduler, the control is directly back to the "interrupted" LWP. - Which means that "fast" soft interrupt precedes preemptiveness; MD soft interrupt dispatcher ignores l_nopreempt. (Calling "interrupted" threads as "preempted" threads is confusing. It's a pity that these are called differently (l_switchto, pinned, ...).)
