Re: [raw v1 2/4] [NET] Use raw_cpu ops for SNMP stats

From: Peter Zijlstra
Date: Tue Oct 08 2013 - 06:22:09 EST


On Tue, Oct 08, 2013 at 09:21:14AM +0200, Ingo Molnar wrote:
>
> * Christoph Lameter <cl@xxxxxxxxx> wrote:
>
> > SNMP stats are not protected by preemption but by bh handling.
>
> Most forms of bh exclusion work via the preemption count though, and
> softirq contexts themselves are generally not preemptible [to other CPUs]
> either.
>
> So the warnings should, in most cases, not trigger.

Right, so softirqs run either in the irq tail at which point
preempt_count += SOFTIRQ_OFFSET and thus preemption is disabled, or it
runs in ksoftirqd which has strict cpu affinity which also disables the
warning, and it also increments preempt_count with SOFTIRQ_OFFSET to
exclude the softirq from interrupts while its running, also disabling
the warning.

So it should very much not trigger.. if it does you want to know about
it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/