lkml.org 
[lkml]   [2016]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] cpu/hotplug: handle unbalanced hotplug enable/disable
On Mon, 6 Jun 2016, Lianwei Wang wrote:
> Currently it just print a warning message but did not
> reset cpu_hotplug_disabled when the enable/disable is
> unbalanced. The unbalanced enable/disable will lead
> the cpu hotplug work abnormally.
>
> Do nothing if an unablanced hotplug enable detected.
>
> Signed-off-by: Lianwei Wang <lianwei.wang@gmail.com>
> ---
> kernel/cpu.c | 21 +++++++++++++++++----
> 1 file changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index 3e3f6e49eabb..8011b1e40523 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -245,6 +245,19 @@ void cpu_hotplug_done(void)
> cpuhp_lock_release();
> }
>
> +static void _cpu_hotplug_disable(void)

What's the purpose of this function?

> +{
> + cpu_hotplug_disabled++;
> +}
> +
> +static void _cpu_hotplug_enable(void)

Double underscores please

> +{
> + if (WARN(!cpu_hotplug_disabled, "Unbalanced cpu hotplug enable\n"))
> + return;

And this want's to be a WARN_ONCE()

Thanks,

tglx

\
 
 \ /
  Last update: 2016-06-07 09:01    [W:3.584 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site