mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Lianwei Wang <lianwei.wang@gmail.com>
Cc: peterz@infradead.org, oleg@redhat.com, mingo@kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v2] cpu/hotplug: handle unbalanced hotplug enable/disable
Date: Tue, 7 Jun 2016 08:34:12 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1606070832440.28031@nanos> (raw)
In-Reply-To: <1465279021-3299-1-git-send-email-lianwei.wang@gmail.com>

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

  reply	other threads:[~2016-06-07  6:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07  5:57 Lianwei Wang
2016-06-07  6:34 ` Thomas Gleixner [this message]
2016-06-08  7:31   ` Lianwei Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.11.1606070832440.28031@nanos \
    --to=tglx@linutronix.de \
    --cc=lianwei.wang@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®