Messages in this thread | | | From | "Rafael J. Wysocki" <> | Subject | Re: [PATCH Updated] PM/Freezer: Thaw only kernel threads if freezing of kernel threads fails | Date | Sat, 4 Feb 2012 23:27:09 +0100 |
| |
On Saturday, February 04, 2012, Srivatsa S. Bhat wrote: > On 02/02/2012 04:29 AM, Srivatsa S. Bhat wrote: > > > > > From: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> > > Subject: [PATCH] PM/Freezer: Thaw only kernel threads if freezing of kernel threads fails > > > > If freezing of kernel threads fails, we are expected to automatically thaw > > tasks in the error recovery path. However, at times, we encounter situations > > in which we would like the automatic error recovery path to thaw only the > > kernel threads, because we want to be able to do some more cleanup before > > we thaw userspace. Something like: > > > > error = freeze_kernel_threads(); > > if (error) { > > /* Do some cleanup */ > > > > /* Only then thaw userspace tasks*/ > > thaw_processes(); > > } > > > > An example of such a situation is where we freeze/thaw filesystems during > > suspend/hibernation. There, if freezing of kernel threads fails, we would > > like to thaw the frozen filesystems before thawing the userspace tasks. > > > > So, modify freeze_kernel_threads() to thaw only kernel threads in case of > > freezing failure. And change suspend_freeze_processes() accordingly. > > (At the same time, let us also get rid of the rather cryptic usage of the > > conditional operator (:?) in that function.) > > > > Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> > > Acked-by: Tejun Heo <tj@kernel.org> > > --- > > > Hi Rafael, > > I have reworked the changelog of this patch to indicate that this fixes a > regression. Here is the updated patch:
Well, I've already fixed that up in my tree, but thanks anyway. :-)
Rafael
| |