For normal interrupts, we check for bh on interrutp return. For idleloop no interrupt case, we will have to call bh handler explicitly asotherwise we will go back to idle until need_resched().local_bh_enable() handles this bh call here.

>> > Why doesn't ipiless_idle_exit() call this? That would keep it isolated>> > to just those idle routines that actually use mwait instead of bothering>> > the generic idle paths with this.>>>> ipiless_idle_exit is called in the inner most part of idle entry exit.>> In mwait case we may not even have interrupts enabled at that time and>> there is code that does idle residency timing etc which will get>> impacted if we start doing the pending ipi work there. Doing it at>> higher level along with things like enter-exit tickless felt nicer.>> But but but, an actual interrupt can be handled before the instruction> after mwait, so why would this be a problem?>

With most commom usage of mwait(), interrupts are disabled on entryand exit from mwait(). There is a special flag that brings CPU out ofmwait on interrupt, without actually handling the interrupt. We doC-state timing in acpi idle/intel idle and enable interrupts and thatswhere interrupt will get handled. My concern is calling the interruptand bh immediatley after mwait exit will inflate C-state residencytimings.