Linux Power Management development
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Lianwei Wang <lianwei.wang@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	oleg@redhat.com, Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable
Date: Fri, 22 Apr 2016 18:37:53 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1604221834430.3941@nanos> (raw)
In-Reply-To: <CAJFUiJih1YMast1S2z4_sfVaLwsPpHyRrS9tAhwTket2KbRDxA@mail.gmail.com>

On Fri, 22 Apr 2016, Lianwei Wang wrote:

> On Thu, Apr 21, 2016 at 3:50 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Wed, Apr 20, 2016 at 09:56:07PM -0700, 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.
> >>
> >> Reset it to 0 when an unablanced enable detected.
> >
> > How can this happen in the first place?
> 
> That's is my question too, and why we check it with WARN_ON here?
> Obviously it is possible to happened because the
> cpu_hotplug_disable/enable are both kernel API and any driver can call
> it. A unbalanced check is a good way to handle it.
> 
> The actually problem here is that what we do in case it happened? Just
> give a warning or do some error handling and recover it back? This's
> my focus..

Actually we do nothing if it happens. We just emit a warning and that's good
enough because the machine is still accessible and therefor debugable. It just
renders cpu hotplug useless, but that's not a fundamental problem. If you look
at the checks we do with preempt count, where we actually restore the counter
that's a different issue. If we would not do that we simply would break the
machine completely and end up in an endless storm of warnings. Different
story, but that hotplug thing is just not in that class of problems.

Thanks,

	tglx

  reply	other threads:[~2016-04-22 16:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21  4:56 [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable Lianwei Wang
2016-04-21 10:50 ` Peter Zijlstra
2016-04-22 16:32   ` Lianwei Wang
2016-04-22 16:37     ` Thomas Gleixner [this message]
2016-04-22 21:58       ` Lianwei Wang
2016-04-25  8:22         ` Thomas Gleixner
2016-04-26  6:58           ` Lianwei Wang
2016-04-27 10:17             ` Thomas Gleixner
2016-04-28  6:10               ` Lianwei Wang
2016-04-28  6:15                 ` Thomas Gleixner
2016-04-28 17:25                   ` Lianwei Wang
2016-04-29  0:44                     ` Thomas Gleixner
2016-04-29 21:47                       ` Lianwei Wang
2016-05-02  8:11                         ` Thomas Gleixner
2016-05-04  7:23                           ` Lianwei Wang
2016-05-05 12:13                             ` Thomas Gleixner
2016-05-06  7:06                               ` Lianwei Wang
2016-05-06  7:18                                 ` Thomas Gleixner
2016-05-12  8:06                                   ` Lianwei Wang
2016-06-07  5:38                                     ` 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.1604221834430.3941@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