Re: [PATCH 1/3] clockevents: Use an atomic RCU notifier for clockevents

From: Andi Kleen
Date: Tue Sep 06 2011 - 16:33:49 EST


On Tue, Sep 06, 2011 at 09:23:55PM +0200, Thomas Gleixner wrote:
> On Mon, 29 Aug 2011, Andi Kleen wrote:
>
> > From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> >
> > Use an atomic_notifier instead of a raw_notifier for the clockevents
> > notification.
> >
> > This avoids a global lock in the idle path, is a scalability
> > problem. With this patch we don't have a global lock anymore
> > at least on systems with an always running timer.
>
> And why is that code called on a system with an always running local
> apic timer at all? The broadcast horror is explicitely only for those
> systems with wreckaged hardware.

Because the notifier is before the check for always running local apic timer.

clockevents_notify ->
clockevents_do_notify ->
raw_spin_lock_irqsave(&clockevents_lock, flags);
clockevents_do_notify(reason, arg);

tick_notifier ->
tick_notify ->
tick_broadcast_on_off ->
tick_do_broadcast_on_off

/* check */
if (!dev || !(dev->features & CLOCK_EVT_FEAT_C3STOP))
goto out;

You also get bonus points for a incredible convoluted call chain,
about 50% of it being unnecessary and full of scalability problems.

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