Re: [PATCH] avoid second smp_processor_id() call in__touch_watchdog

From: Peter Zijlstra
Date: Wed Sep 22 2010 - 12:40:13 EST


On Wed, 2010-09-22 at 18:27 +0200, Frederic Weisbecker wrote:
>
> I'm not sure we want this. This is called by the watchdog internally,
> from the timer or the cpu bound thread, so we probably should better
> keep __get_cpu_var() because it checks that we are not in a preemptable
> section.

The smp_processor_id() right at the start already does that.

That said, I doubt it really matter one way or the other, compilers have
been known to do CSE for quite a while.
--
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/