Re: [PATCH RFC tip/core/rcu 4/4] rcu: Ensure that RCU_FAST_NO_HZtimers expire on correct CPU

From: Steven Rostedt
Date: Thu Apr 26 2012 - 12:09:02 EST


On Thu, 2012-04-26 at 08:54 -0700, Paul E. McKenney wrote:

> > The simpler change looks to use mod_timer_pinned()
>
> Good point!
>
> Except... Now that you mention it, I don't see how mod_timer_pinned()
> actually helps. It looks to me like a CPU-hotplug operation will
> migrate the timers anyway.
>
> This is actually (in theory) harmless in the RCU_FAST_NO_HZ case, because
> the CPU_DYING stuff will force a wakeup of the CPU in question, which
> will cancel the timer. But still, mod_timer_pinned() has a rather
> misleading name. ;-)
>
> But a line is a line, so I made this change.
>

It's expected that if you use this (or anything else pinned to a CPU)
that you add the hotplug hooks to handle a CPU going down.

There's only two users of this that I see. One is
arch/x86/kernel/apic/x2apic_uv_x.c, that has the hotplug handling. The
other is drivers/net/ethernet/tile/tilepro.c, that does not have hotplug
handling, but the tile arch does not support hotplug anyway:

arch/tile/kernel/process.c: cpu_idle()

if (cpu_is_offline(cpu))
BUG(); /* no HOTPLUG_CPU */

-- Steve


--
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/