Re: [PATCH 1/1] task_work: Add local_irq_enable() intotask_work_run()

From: Al Viro
Date: Sat Oct 13 2012 - 11:39:03 EST


On Sat, Oct 13, 2012 at 10:59:25PM +1300, Michael Cree wrote:

> Any chance that we could have the fixes backported to the stable queue, in
> particular to the 3,2 kernel? We should then be able to run the Debian built
> SMP kernel on the autobuilders at Debian-Ports rather than having to run a
> specially built kernel or a UP kernel.
>
> BTW, the WARNING: at kernel/softirq.c:139 __local_bh_enable+0xe8/0x110() still
> occurs when bringing up the CPUs. Actually it happens twice now. I've
> attached my dmesg dump should you wish to check.

The obvious fix is to add local_irq_disable() into do_entInt(), just before
calling handle_ipi(). But I'm not sure if we wouldn't be better off just
doing it right in the beginning of do_entInt(). Take a look at that switch
in there: case 0 - we want local_irq_disable() done before handle_ipi().
case 1 - we do local_irq_disable() right there on SMP and do it almost
instantly in case of UP, since handle_irq() will do it a few insns after
entry anyway. case 3 - ->device_interrupt() calls handle_irq() very soon
on all subarchitectures. That leaves machine checks and perf_irq. I have
no idea how hot those paths really are; do we spend enough time in there
to make blanket local_disable_irq() on those painful? If not, we'd probably
be better off just lifting local_disable_irq() to the beginning of
do_entInt() and killing it in handle_irq() - that sucker is always called
from do_entInt(), directly or via ->device_interrupt().

Comments?
--
To unsubscribe from this list: send the line "unsubscribe linux-alpha" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html