From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@ucw.cz>
Cc: nigel@suspend2.net, pm list <linux-pm@lists.linux-foundation.org>,
Alan Stern <stern@rowland.harvard.edu>,
LKML <linux-kernel@vger.kernel.org>,
Oliver Neukum <oliver@neukum.org>,
Miklos Szeredi <miklos@szeredi.hu>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Matthew Garrett <mjg59@srcf.ucam.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC][PATCH -mm] Freezer: Handle uninterruptible tasks
Date: Sat, 7 Jul 2007 22:44:45 +0200 [thread overview]
Message-ID: <200707072244.46645.rjw@sisk.pl> (raw)
In-Reply-To: <20070707113118.GA2789@elf.ucw.cz>
On Saturday, 7 July 2007 13:31, Pavel Machek wrote:
> Hi!
>
> > > I don't think we can do that. I suspect rename looks like:
> > >
> > > write directory entry in source
> > > A) (uninterruptible wait for write)
> > > write directory entry in destination
> > > (uninterruptible wait for write)
> > > write something else
> > >
> > > If we freeze some task in place "A)", we'll write to the disk when the
> > > directory write is finished :-(.
> >
> > Renaming is a single syscall, so won't the process get frozen when the syscall
> > finishes?
>
> It would be frozen when syscall finishes. But if we freeze it at A)
> point, we have a problem.
With this patch, we don't freeze it. :-)
We do something like "send a freeze request to this task, but don't care if it
doesn't freeze".
Now, IMHO, the correctness here is the question of for how long a task can be
in TASK_UNINTERRUPTIBLE it it's not stuck (eg. the resource needed is gone
indefinitely, like in NFS) and I think that's not very long.
For example, if the tasks sleeps on a mutex, then it waits for another task to
release the mutex (interrupt handlers don't use mutexes) and I don't know of
any realistic scenario in which it can last in that state throughout
freeze_processes().
Greetings,
Rafael
--
"Premature optimization is the root of all evil." - Donald Knuth
next prev parent reply other threads:[~2007-07-07 20:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-06 8:12 [RFC][PATCH -mm] Freezer: Handle uninterruptible tasks Rafael J. Wysocki
2007-07-06 15:01 ` Alan Stern
2007-07-07 23:08 ` Rafael J. Wysocki
2007-07-08 12:09 ` Pavel Machek
2007-07-08 13:55 ` Rafael J. Wysocki
2007-07-09 4:21 ` Jeremy Maitin-Shepard
2007-07-09 14:45 ` Alan Stern
2007-07-09 15:36 ` Jeremy Maitin-Shepard
2007-07-08 18:37 ` Pavel Machek
2007-07-07 7:50 ` Pavel Machek
2007-07-07 9:13 ` Nigel Cunningham
2007-07-07 11:31 ` Pavel Machek
2007-07-07 20:44 ` Rafael J. Wysocki [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-07-06 20:26 Oleg Nesterov
2007-07-06 22:38 ` Oliver Neukum
2007-07-06 23:00 ` Rafael J. Wysocki
2007-07-07 23:08 ` Rafael J. Wysocki
2007-07-06 22:56 ` Rafael J. Wysocki
2007-07-06 23:46 ` Nigel Cunningham
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=200707072244.46645.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=miklos@szeredi.hu \
--cc=mingo@elte.hu \
--cc=mjg59@srcf.ucam.org \
--cc=nigel@suspend2.net \
--cc=oliver@neukum.org \
--cc=pavel@ucw.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