Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1390678

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable
Date 2016-04-29 02:50 +0200
Message-ID <rt4N4-57S-13@gated-at.bofh.it> (permalink)
References (6 earlier) <rs58u-2ZZ-23@gated-at.bofh.it> <rsuJz-7VP-7@gated-at.bofh.it> <rsNsR-6MM-3@gated-at.bofh.it> <rsNsR-6MM-1@gated-at.bofh.it> <rsXVg-7D9-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 28 Apr 2016, Lianwei Wang wrote:
> On Wed, Apr 27, 2016 at 11:15 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > On Wed, 27 Apr 2016, Lianwei Wang wrote:
> >> Yes. In our project, there is a kernel driver which register a pm
> >> notifier. On some conditions this pm notifier will return an error and
> >> abort the suspend process. The counter will be unbalanced in case it
> >> happened.
> >
> > So what? You wreckaged your driver, so you fix it and be done with it.
> 
> Do you mean no pm_notifier callback can return an error or NOTIFY_BAD
> to abort the suspend process?
> 
> It's not the driver issue. The driver return an error to abort the
> suspend process on purpose. Why do you think it is not allowed to
> return an error to abort suspend?
> 
> The issue is very clear as described below.
> 1. How the issue happened?
> One of the pm notifier return error to abort suspend before
> cpu_hotplug_disable() is called on PM_SUSPEND_PREPARE.
> 
> 2. What's the result?
> CPU hotplug work in a wrong way, or it doesn't work anymore. No way to
> recover it.
> 
> 3. The root cause is that there is no any handling for the unbalanced
> cpu_hotplug_disable/enable calling. This patch add a protection for
> such issue.

Wrong. This is the symptom. The root cause is in #1. Therefor you are trying
to fix the symptom and not the root cause
 
> Anything not clear?

No. 

I completely understand that you are tyring to put the cart before the horse.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable Lianwei Wang <lianwei.wang@gmail.com> - 2016-04-28 19:30 +0200
  Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable Thomas Gleixner <tglx@linutronix.de> - 2016-04-29 02:50 +0200
    Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable Lianwei Wang <lianwei.wang@gmail.com> - 2016-04-29 23:50 +0200
      Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable Thomas Gleixner <tglx@linutronix.de> - 2016-05-02 10:20 +0200
        Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable Lianwei Wang <lianwei.wang@gmail.com> - 2016-05-04 09:30 +0200
          Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable Thomas Gleixner <tglx@linutronix.de> - 2016-05-05 14:20 +0200
            Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable Lianwei Wang <lianwei.wang@gmail.com> - 2016-05-06 09:10 +0200
              Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable Thomas Gleixner <tglx@linutronix.de> - 2016-05-06 09:30 +0200
                Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable Lianwei Wang <lianwei.wang@gmail.com> - 2016-05-12 10:10 +0200

csiph-web