public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Pavel Machek <pavel@ucw.cz>,
	linux-pm@vger.kernel.org,
	Kyungmin Park <kyungmin.park@samsung.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Colin Cross <ccross@android.com>
Subject: Re: [RFC PATCH] freezer: allow killing of frozen tasks
Date: Tue, 20 Aug 2013 08:18:19 -0400	[thread overview]
Message-ID: <20130820121819.GA3926@htj.dyndns.org> (raw)
In-Reply-To: <4596920.E6jI568rc1@vostro.rjw.lan>

Hello,

On Tue, Aug 20, 2013 at 02:23:32PM +0200, Rafael J. Wysocki wrote:
> On Tuesday, August 20, 2013 01:20:03 PM Bartlomiej Zolnierkiewicz wrote:
> > Change __refrigerator() to allow SIGKILL signal handling during
> > the frozen state (by setting task to a TASK_KILLABLE state instead
> > of TASK_UNINTERRUPTIBLE one before entering sleep) and make tasks
> > leave __refrigerator() upon receiving such signal.
> > 
> > These changes allow frozen tasks to be killed immediately without
> > the need to thaw them first.
> > 
> > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> 
> Well, it doesn't sound like an entirely bad idea to me, but I'd like to know
> what Colin and Tejun (CCed now) think about it.

The problem is that we really don't know where each task is frozen in
the kernel so don't know what happens after the task leaves the
freezer is safe whether it's dying or not.  We don't have any rules
restricting where a freeze point should be and a task may do any
operation between freezer and actual exit.

So, I don't think we can simply turn TASK_UNITERRUPTIBLE to
TASK_KILLABLE at this point.  We really need to strictly define where
a task can freeze before being able to do anything like this.

Thanks.

-- 
tejun

  reply	other threads:[~2013-08-20 12:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20 11:20 [RFC PATCH] freezer: allow killing of frozen tasks Bartlomiej Zolnierkiewicz
2013-08-20 12:23 ` Rafael J. Wysocki
2013-08-20 12:18   ` Tejun Heo [this message]
2013-08-20 12:30     ` Rafael J. Wysocki
2013-08-20 12:22       ` Tejun Heo
2013-08-20 12:34         ` Rafael J. Wysocki
2013-08-20 12:27           ` Tejun Heo
2013-08-20 12:41             ` Rafael J. Wysocki
2013-09-25  5:52               ` Kyungmin Park
2013-09-25  8:07                 ` Rafael J. Wysocki
2013-09-26  1:46                   ` Colin Cross

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=20130820121819.GA3926@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=ccross@android.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    /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