From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@ucw.cz>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
pm list <linux-pm@lists.linux-foundation.org>,
Oleg Nesterov <oleg@tv-sign.ru>,
Miklos Szeredi <miklos@szeredi.hu>
Subject: Re: [RFC][PATCH -mm 7/7] Freezer: Use freezing timeout more efficiently
Date: Sat, 14 Jul 2007 11:20:06 +0200 [thread overview]
Message-ID: <200707141120.07101.rjw@sisk.pl> (raw)
In-Reply-To: <20070713234350.GE15498@elf.ucw.cz>
On Saturday, 14 July 2007 01:43, Pavel Machek wrote:
> Hi!
>
> > There is the problem with try_to_freeze_tasks() that it always loops until the
> > timeout expires, even if it is certain to fail much earlier. Namely, if there
> > are uninterruptible tasks waiting for some frozen tasks to let them continue,
> > try_to_freeze_tasks() will certainly fail and it shouldn't waste time in that
> > cases.
> >
> > To detect such situations, we can check if the number of tasks that haven't
> > frozen yet changes between subsequent iterations of the main loop in
> > try_to_freeze_tasks(). If this number hasn't been changing for sufficiently
> > long time (say, 250 ms), then most probably some uninterruptible tasks are
> > blocked by some frozen tasks and we should break out of this stalemate. Thus,
> > it seems reasonable to thaw the tasks that have already been frozen without
> > clearing the freeze requests of the tasks that are refusing to freeze. This
> > way, if these tasks are really blocked by the frozen ones, they will get extra
> > chance to freeze themselves after we have thawed the other tasks and before we
> > request those tasks to freeze again. Next, the freezing loop can be repeated
> > and so on, until all tasks are frozen or the timeout expires.
>
> I still don't quite like this patch... it is kind of trick we should
> not have to play. Can we at least get confirmation it helps in the
> FUSE case?
Well, anyone having problems with FUSE vs the freezer please check. :-)
I think I'll send the series to Andrew without this patch. Would that be OK?
Greetings,
Rafael
--
"Premature optimization is the root of all evil." - Donald Knuth
prev parent reply other threads:[~2007-07-14 9:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-11 22:06 [RFC][PATCH -mm 0/7] Freezer update (updated) Rafael J. Wysocki
2007-07-11 22:08 ` [RFC][PATCH -mm 1/7] Freezer: Document relationship with memory shrinking Rafael J. Wysocki
2007-07-11 22:10 ` [RFC][PATCH -mm 2/7] Freezer: Do not sync filesystems from freeze_processes Rafael J. Wysocki
2007-07-11 22:42 ` Pavel Machek
2007-07-11 22:12 ` [RFC][PATCH -mm 3/7] Freezer: Prevent new tasks from inheriting TIF_FREEZE set Rafael J. Wysocki
2007-07-11 22:25 ` Nigel Cunningham
2007-07-11 22:13 ` [RFC][PATCH -mm 4/7] Freezer: Introduce freezer-firendly waiting macros Rafael J. Wysocki
2007-07-11 22:56 ` Pavel Machek
2007-07-12 10:33 ` Rafael J. Wysocki
2007-07-11 23:02 ` Oleg Nesterov
2007-07-12 10:30 ` [RFC][PATCH -mm 4/7] Freezer: Introduce freezer-firendly waiting macros (updated) Rafael J. Wysocki
2007-07-12 12:23 ` [RFC][PATCH -mm 4/7] Freezer: Introduce freezer-firendly waiting macros (updated 2x) Rafael J. Wysocki
2007-07-11 22:14 ` [RFC][PATCH -mm 5/7] Freezer: Do not send signals to kernel threads (updated) Rafael J. Wysocki
2007-07-11 22:16 ` [RFC][PATCH -mm 6/7] Freezer: Be more verbose Rafael J. Wysocki
2007-07-11 22:58 ` Pavel Machek
2007-07-12 10:39 ` [RFC][PATCH -mm 6/7] Freezer: Be more verbose (updated) Rafael J. Wysocki
2007-07-11 22:17 ` [RFC][PATCH -mm 7/7] Freezer: Use freezing timeout more efficiently Rafael J. Wysocki
2007-07-12 10:38 ` [RFC][PATCH -mm 7/7] Freezer: Use freezing timeout more efficiently (updated) Rafael J. Wysocki
2007-07-13 23:43 ` [RFC][PATCH -mm 7/7] Freezer: Use freezing timeout more efficiently Pavel Machek
2007-07-14 9:20 ` Rafael J. Wysocki [this message]
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=200707141120.07101.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-pm@lists.linux-foundation.org \
--cc=miklos@szeredi.hu \
--cc=mjg59@srcf.ucam.org \
--cc=oleg@tv-sign.ru \
--cc=pavel@ucw.cz \
/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