lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 12 Oct 2011 02:02:56 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC:	rjw@...k.pl, bp@...64.org, pavel@....cz, len.brown@...el.com,
	tj@...nel.org, mingo@...e.hu, akpm@...ux-foundation.org,
	suresh.b.siddha@...el.com, lucas.demarchi@...fusion.mobi,
	rusty@...tcorp.com.au, rdunlap@...otime.net,
	vatsa@...ux.vnet.ibm.com, ashok.raj@...el.com,
	tigran@...azian.fsnet.co.uk, tglx@...utronix.de, hpa@...or.com,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org
Subject: Re: [PATCH v2 2/3] Mutually exclude cpu online and suspend/hibernate

On 10/10/2011 08:46 PM, Srivatsa S. Bhat wrote:
> On 10/10/2011 07:56 PM, Peter Zijlstra wrote:
>> On Mon, 2011-10-10 at 18:15 +0530, Srivatsa S. Bhat wrote:
>>>> +     /*
>>>> +      * Prevent cpu online and suspend/hibernate (including freezer)
>>>> +      * operations from running in parallel. Fail cpu online if suspend or
>>>> +      * hibernate has already started.
>>>> +      */
>>>> +     if (!trylock_pm_sleep())
>>>
>>> Would it be better to hook into the suspend/hibernate notifiers and
>>> use them to exclude cpu hotplug from suspend/hibernate, instead of
>>> trying to take pm_mutex lock like this?
>>> Peter, I remember you pointing out in another patch's review
>>> (http://thread.gmane.org/gmane.linux.kernel/1198312/focus=1199087)
>>> that introducing more locks in cpu hotplug would be a bad idea. Does that
>>> comment hold here as well, or is this fine? 
>>
>> Arguably pm_mutex is already involved in the whole hotplug dance due to
>> suspend using it, that said, I'm not at all familiar with the whole
>> suspend/hibernate side of things.
>>
>> I tried having a quick look this morning but failed to find the actual
>> code.
>>
>> I think it would be good to have an overview of the various locks and a
>> small description of how they interact/nest.
>>
> 
> Sure. I'll put together whatever I have understood, in the form of a patch
> to Documentation/power directory and post it tomorrow, for the benefit of
> all.
> 

Here it is, just as promised :-)
http://lkml.org/lkml/2011/10/11/393

>> I just remember being very surprised about finding out the hotplug usage
>> of suspend/hibernate wasn't at all serialized against the regular
>> hotplug thingies.. (see 144060fee07e9c22e179d00819c83c86fbcbf82c).
>>
>>
>>
> 


-- 
Regards,
Srivatsa S. Bhat  <srivatsa.bhat@...ux.vnet.ibm.com>
Linux Technology Center,
IBM India Systems and Technology Lab
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ