Re: [PATCH v2 2/3] Mutually exclude cpu online and suspend/hibernate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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).



--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux