linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Tejun Heo <tj@kernel.org>,
	pavel@ucw.cz, len.brown@intel.com, linux-pm@vger.kernel.org,
	"linux-kernel" <linux-kernel@vger.kernel.org>,
	Nigel Cunningham <nigel@tuxonice.net>
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	[thread overview]
Message-ID: <201202042327.10045.rjw@sisk.pl> (raw)
In-Reply-To: <4F2D3C90.3000708@linux.vnet.ibm.com>

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

  reply	other threads:[~2012-02-04 22:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01 22:31 [PATCH] PM/Freezer: Thaw only kernel threads if freezing of kernel threads fails Srivatsa S. Bhat
2012-02-01 22:36 ` Tejun Heo
2012-02-01 22:49   ` Rafael J. Wysocki
2012-02-01 22:59   ` Srivatsa S. Bhat
2012-02-02  3:15     ` Nigel Cunningham
2012-02-02 19:38     ` Rafael J. Wysocki
2012-02-04 14:11     ` [PATCH Updated] " Srivatsa S. Bhat
2012-02-04 22:27       ` Rafael J. Wysocki [this message]
2012-02-05  6:06         ` Hillf Danton
2012-02-05 10:57           ` Srivatsa S. Bhat
2012-02-05 11:09             ` Rafael J. Wysocki
2012-02-05 11:31             ` Hillf Danton
2012-02-05 10:59           ` Rafael J. Wysocki

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=201202042327.10045.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nigel@tuxonice.net \
    --cc=pavel@ucw.cz \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=tj@kernel.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;
as well as URLs for NNTP newsgroup(s).