[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1250529719.2709.11.camel@josh-work.beaverton.ibm.com>
Date: Mon, 17 Aug 2009 10:21:59 -0700
From: Josh Triplett <josht@...ux.vnet.ibm.com>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc: linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
dipankar@...ibm.com, akpm@...ux-foundation.org,
mathieu.desnoyers@...ymtl.ca, dvhltc@...ibm.com, niv@...ibm.com,
tglx@...utronix.de, peterz@...radead.org, rostedt@...dmis.org,
hugh.dickins@...cali.co.uk, benh@...nel.crashing.org
Subject: Re: [PATCH -tip/core/rcu 2/6] Introduce cpu_notifier() to handle
!HOTPLUG_CPU case
On Sat, 2009-08-15 at 09:53 -0700, Paul E. McKenney wrote:
> From: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
>
> This patch introduces a new cpu_notifier() API that is similar to
> hotcpu_notifier(), but which also notifies of CPUs coming online during
> boot in the !HOTPLUG_CPU case.
[...]
> --- a/include/linux/cpu.h
> +++ b/include/linux/cpu.h
> @@ -48,6 +48,15 @@ struct notifier_block;
>
> #ifdef CONFIG_SMP
> /* Need to know about CPUs going up/down? */
> +#if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE)
> +#define cpu_notifier(fn, pri) { \
> + static struct notifier_block fn##_nb __cpuinitdata = \
> + { .notifier_call = fn, .priority = pri }; \
> + register_cpu_notifier(&fn##_nb); \
> +}
> +#else /* #if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE) */
> +#define cpu_notifier(fn, pri) do { (void)(fn); } while (0)
> +#endif /* #else #if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE) */
These two definitions seem inconsistent. I think the first one needs to
change to use do { ... } while(0) as well, so it eats the subsequent
semicolon.
Does this really want to live under defined(CONFIG_HOTPLUG_CPU)? What
happens when onlining CPUs during the !define(CONFIG_HOTPLUG_CPU) case?
This seems somewhat inconsistent with the explanation in your commit
message; can you clarify?
Also, why !defined(MODULE)?
- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists