public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Pavel Machek <pavel@suse.cz>,
	pm list <linux-pm@lists.linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>, Len Brown <lenb@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Matt Helsley <matthltc@us.ibm.com>,
	Cedric Le Goater <clg@fr.ibm.com>,
	Paul Menage <menage@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Liam Howlett <howlett@gmail.com>
Subject: Re: [RFC][PATCH 2/2] Freezer: Try to handle killable tasks
Date: Wed, 7 May 2008 20:35:55 +0200	[thread overview]
Message-ID: <200805072035.57450.rjw@sisk.pl> (raw)
In-Reply-To: <20080507135757.GT19219@parisc-linux.org>

On Wednesday, 7 of May 2008, Matthew Wilcox wrote:
> On Wed, May 07, 2008 at 11:41:50AM +0200, Pavel Machek wrote:
> > > @@ -182,6 +183,8 @@ __mutex_lock_common(struct mutex *lock, 
> > >  		/* didnt get the lock, go to sleep: */
> > >  		spin_unlock_mutex(&lock->wait_lock, flags);
> > >  		schedule();
> > > +		if (state == TASK_KILLABLE)
> > > +			try_to_freeze();
> > >  		spin_lock_mutex(&lock->wait_lock, flags);
> > >  	}
> > >  
> > 
> > I'm not comfortable with this one. Can the task be killable, but still
> > hold some _other_ mutex? (and then release it only if it actually gets
> > the signal?)
> 
> Yes, that's exactly what's supposed to happen.

The question, though, is whether there is a driver that will try to lock this
mutex in its .suspend() or .resume() callback.  If there is one, TASK_KILLABLE
won't help the freezer indeed.

Thanks,
Rafael

  reply	other threads:[~2008-05-07 18:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-06 22:03 [RFC][PATCH 0/2] Freezer face lifting Rafael J. Wysocki
2008-05-06 22:05 ` [RFC][PATCH 1/2] Freezer: Introduce PF_FREEZER_NOSIG Rafael J. Wysocki
2008-05-07  0:38   ` [linux-pm] " Gautham R Shenoy
2008-05-07 12:11     ` Rafael J. Wysocki
2008-05-07  9:36   ` Pavel Machek
2008-05-07 12:16     ` Rafael J. Wysocki
2008-05-06 22:07 ` [RFC][PATCH 2/2] Freezer: Try to handle killable tasks Rafael J. Wysocki
2008-05-07  9:41   ` Pavel Machek
2008-05-07 13:57     ` Matthew Wilcox
2008-05-07 18:35       ` Rafael J. Wysocki [this message]
2008-05-07 13:53   ` Matthew Wilcox
2008-05-07 18:41     ` Rafael J. Wysocki
2008-05-19 22:59       ` Pavel Machek

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=200805072035.57450.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=clg@fr.ibm.com \
    --cc=howlett@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=matthew@wil.cx \
    --cc=matthltc@us.ibm.com \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    --cc=pavel@suse.cz \
    --cc=stern@rowland.harvard.edu \
    /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