From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Oliver Neukum <oliver@neukum.org>
Cc: Bastien ROUCARIES <roucaries.bastien@gmail.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Maxim Levitsky <maximlevitsky@gmail.com>,
linux-pm@lists.linux-foundation.org,
LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] Memory allocations in .suspend became very unreliable)
Date: Thu, 21 Jan 2010 08:11:04 +1100 [thread overview]
Message-ID: <1264021864.724.552.camel@pasglop> (raw)
In-Reply-To: <201001201231.17540.oliver@neukum.org>
On Wed, 2010-01-20 at 12:31 +0100, Oliver Neukum wrote:
>
> But we have the freezer. So generally we don't require that knowledge.
> We can expect no normal IO to happen.
That came before and it's just not a safe assumption :-) The freezer to
some extent protects drivers against ioctl's and that sort of stuff but
really that's about it. There's plenty of things in the kernel that can
kick IOs on their own for a reason or another, or do memory allocations
which in turn will try to push something out and do IOs etc... even when
"frozen".
> The question is in the suspend paths. We never may use anything
> but GFP_NOIO (and GFP_ATOMIC) in the suspend() path. We can
> take care of that requirement in the allocator only if the whole
> system
> is suspended. As soon as a driver does runtime power management,
> it is on its own.
I'm not sure I understand what you are trying to say here :-)
First of all, the problem goes beyond what a driver does in its own
suspend() path. If it was just that, we might be able to some extent to
push enough stuff up for the driver to specify the right GFP flags
(though even that could be nasty).
The problem with system suspend also happens when your driver has not
been suspended yet, but another one, which happens to be a block device
with dirty pages for example, has.
Your not-yet-suspended driver might well be blocked somewhere in an
allocation or about to make one with some kind of internal mutex held,
that sort of thing, as part of it's normal operations, and -that- can
hang, causing problems when subsequently that same driver suspend() gets
called and tries to synchronize with the driver operations, for example
by trying to acquire that same mutex.
There's more of similarily nasty scenario. The fact is that it's going
to hit rarely, probably without a bakctrace or a crash, and so will
basically cause one of those rare "my laptop didn't suspend" cases that
may not even be reported, and just contribute to the general
unreliability of suspend/resume.
Cheers,
Ben.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-01-20 21:11 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1263549544.3112.10.camel@maxim-laptop>
[not found] ` <1263678289.4276.4.camel@maxim-laptop>
[not found] ` <201001162317.39940.rjw@sisk.pl>
2010-01-17 0:38 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] Memory allocations in .suspend became very unreliable) Rafael J. Wysocki
2010-01-17 1:24 ` Oliver Neukum
2010-01-17 13:27 ` Rafael J. Wysocki
2010-01-17 13:36 ` Rafael J. Wysocki
2010-01-17 18:58 ` Benjamin Herrenschmidt
2010-01-17 23:00 ` Rafael J. Wysocki
2010-01-18 7:53 ` Oliver Neukum
2010-01-18 16:17 ` [linux-pm] [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Alan Stern
2010-01-18 20:59 ` Rafael J. Wysocki
2010-01-19 15:13 ` Alan Stern
2010-01-18 20:56 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-18 21:55 ` Benjamin Herrenschmidt
2010-01-18 23:33 ` Rafael J. Wysocki
2010-01-17 13:55 ` Rafael J. Wysocki
2010-01-17 16:21 ` [linux-pm] [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Minchan Kim
2010-01-17 16:23 ` Minchan Kim
2010-01-18 0:25 ` Rafael J. Wysocki
2010-01-18 2:20 ` KOSAKI Motohiro
2010-01-18 21:06 ` Rafael J. Wysocki
2010-01-19 9:15 ` Oliver Neukum
2010-01-19 20:34 ` Rafael J. Wysocki
2010-01-18 17:00 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Oliver Neukum
2010-01-18 20:41 ` Rafael J. Wysocki
2010-01-19 9:25 ` Oliver Neukum
2010-01-19 20:37 ` Rafael J. Wysocki
2010-01-20 14:05 ` Oliver Neukum
2010-01-20 21:13 ` Rafael J. Wysocki
2010-01-18 2:16 ` KOSAKI Motohiro
2010-01-18 20:55 ` Rafael J. Wysocki
2010-01-19 1:19 ` KOSAKI Motohiro
2010-01-19 3:19 ` Benjamin Herrenschmidt
2010-01-19 9:04 ` Bastien ROUCARIES
2010-01-19 23:17 ` Benjamin Herrenschmidt
2010-01-20 11:31 ` Oliver Neukum
2010-01-20 21:11 ` Benjamin Herrenschmidt [this message]
2010-01-20 21:12 ` Rafael J. Wysocki
2010-01-19 20:47 ` Rafael J. Wysocki
2010-01-20 0:33 ` KOSAKI Motohiro
2010-01-20 21:21 ` Rafael J. Wysocki
2010-01-21 0:47 ` KOSAKI Motohiro
2010-01-21 20:21 ` Rafael J. Wysocki
2010-01-21 20:42 ` [linux-pm] [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Nigel Cunningham
2010-01-21 21:38 ` Rafael J. Wysocki
2010-01-22 1:31 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " KOSAKI Motohiro
2010-01-22 1:42 ` KOSAKI Motohiro
2010-01-22 10:11 ` Maxim Levitsky
2010-01-22 21:19 ` [Update][PATCH] MM / PM: Force GFP_NOIO during suspend/hibernation and resume Rafael J. Wysocki
2010-01-23 9:29 ` Maxim Levitsky
2010-01-25 21:49 ` Rafael J. Wysocki
2010-01-25 21:52 ` Alexey Starikovskiy
2010-01-30 18:56 ` Rafael J. Wysocki
2010-01-30 20:42 ` Maxim Levitsky
2010-01-30 20:53 ` Rafael J. Wysocki
2010-01-22 20:58 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] Memory allocations in .suspend became very unreliable) Rafael J. Wysocki
2010-01-30 15:46 ` Maxim Levitsky
2010-01-30 18:47 ` Rafael J. Wysocki
2010-01-30 20:37 ` Maxim Levitsky
2010-02-01 19:51 ` Maxim Levitsky
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=1264021864.724.552.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=maximlevitsky@gmail.com \
--cc=oliver@neukum.org \
--cc=rjw@sisk.pl \
--cc=roucaries.bastien@gmail.com \
/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).