From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: Memory allocations in .suspend became very unreliable
Date: Sat, 16 Jan 2010 23:17:39 +0100 [thread overview]
Message-ID: <201001162317.39940.rjw@sisk.pl> (raw)
In-Reply-To: <1263678289.4276.4.camel@maxim-laptop>
On Saturday 16 January 2010, Maxim Levitsky wrote:
> On Sat, 2010-01-16 at 01:57 +0100, Rafael J. Wysocki wrote:
> > On Saturday 16 January 2010, Maxim Levitsky wrote:
> > > On Fri, 2010-01-15 at 23:03 +0100, Rafael J. Wysocki wrote:
> > > > On Friday 15 January 2010, Maxim Levitsky wrote:
> > > > > Hi,
> > > >
> > > > Hi,
> > > >
> > > > > I know that this is very controversial, because here I want to describe
> > > > > a problem in a proprietary driver that happens now in 2.6.33-rc3
> > > > > I am taking about nvidia driver.
> > > > >
> > > > > Some time ago I did very long hibernate test and found no errors after
> > > > > more that 200 cycles.
> > > > >
> > > > > Now I update to 2.6.33 and notice that system will hand when nvidia
> > > > > driver allocates memory is their .suspend functions.
> > > >
> > > > They shouldn't do that, there's no guarantee that's going to work at all.
> > > >
> > > > > This could fail in 2.6.32 if I would run many memory hungry
> > > > > applications, but now this happens with most of memory free.
> > > >
> > > > This sounds a little strange. What's the requested size of the image?
> > > Don't know, but system has to be very tight on memory.
> >
> > Can you send full dmesg, please?
>
> I deleted it, but for this case I think that hang was somewhere else.
> This task was hand on doing forking, which probably happened even before
> the freezer.
>
> Anyway, the problem is clear. Now __get_free_pages blocks more often,
> and can block in .suspend even if there is plenty of memory free.
>
> I now patched nvidia to use GFP_ATOMIC _always_, and problem disappear.
> It isn't such great solution when memory is tight though....
>
> This is going to hit hard all nvidia users...
Well, generally speaking, no driver should ever allocate memory using
GFP_KERNEL in its .suspend() routine, because that's not going to work, as you
can readily see. So this is a NVidia bug, hands down.
Now having said that, we've been considering a change that will turn all
GFP_KERNEL allocations into GFP_NOIO during suspend/resume, so perhaps I'll
prepare a patch to do that and let's see what people think.
Rafael
next prev parent reply other threads:[~2010-01-16 22:17 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 9:59 Memory allocations in .suspend became very unreliable Maxim Levitsky
2010-01-15 10:24 ` Romit Dasgupta
2010-01-15 10:34 ` Maxim Levitsky
2010-01-15 22:03 ` Rafael J. Wysocki
2010-01-15 23:56 ` Maxim Levitsky
2010-01-16 0:57 ` Rafael J. Wysocki
2010-01-16 21:44 ` Maxim Levitsky
2010-01-16 22:17 ` Rafael J. Wysocki [this message]
2010-01-17 0:38 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: Memory allocations in .suspend became very unreliable) Rafael J. Wysocki
[not found] ` <201001170138.37283.rjw@sisk.pl>
2010-01-17 1:24 ` Oliver Neukum
[not found] ` <201001170224.36267.oliver@neukum.org>
2010-01-17 13:27 ` Rafael J. Wysocki
[not found] ` <201001171427.27954.rjw@sisk.pl>
2010-01-17 13:36 ` Rafael J. Wysocki
2010-01-17 18:58 ` Benjamin Herrenschmidt
[not found] ` <1263754684.724.444.camel@pasglop>
2010-01-17 23:00 ` Rafael J. Wysocki
[not found] ` <201001180000.23376.rjw@sisk.pl>
2010-01-18 7:53 ` Oliver Neukum
[not found] ` <201001180853.31446.oliver@neukum.org>
2010-01-18 16:17 ` Alan Stern
2010-01-18 20:56 ` Rafael J. Wysocki
2010-01-18 21:55 ` Benjamin Herrenschmidt
[not found] ` <1263851757.724.500.camel@pasglop>
2010-01-18 23:33 ` Rafael J. Wysocki
2010-01-17 13:55 ` Rafael J. Wysocki
[not found] ` <201001171455.55909.rjw@sisk.pl>
2010-01-17 16:21 ` Minchan Kim
[not found] ` <1263745267.2162.42.camel@barrios-desktop>
2010-01-17 16:23 ` Minchan Kim
2010-01-18 0:25 ` Rafael J. Wysocki
[not found] ` <201001180125.59413.rjw@sisk.pl>
2010-01-18 2:20 ` KOSAKI Motohiro
[not found] ` <20100118111703.AE36.A69D9226@jp.fujitsu.com>
2010-01-18 21:06 ` Rafael J. Wysocki
[not found] ` <201001182206.36365.rjw@sisk.pl>
2010-01-19 9:15 ` Oliver Neukum
[not found] ` <201001191015.00470.oliver@neukum.org>
2010-01-19 20:34 ` Rafael J. Wysocki
2010-01-18 17:00 ` Oliver Neukum
[not found] ` <201001181800.38574.oliver@neukum.org>
2010-01-18 20:41 ` Rafael J. Wysocki
[not found] ` <201001182141.49907.rjw@sisk.pl>
2010-01-19 9:25 ` Oliver Neukum
[not found] ` <201001191025.37579.oliver@neukum.org>
2010-01-19 20:37 ` Rafael J. Wysocki
[not found] ` <201001192137.35232.rjw@sisk.pl>
2010-01-20 14:05 ` Oliver Neukum
[not found] ` <201001201505.41167.oliver@neukum.org>
2010-01-20 21:13 ` Rafael J. Wysocki
2010-01-18 2:16 ` KOSAKI Motohiro
[not found] ` <20100118110324.AE30.A69D9226@jp.fujitsu.com>
2010-01-18 20:55 ` Rafael J. Wysocki
[not found] ` <201001182155.09727.rjw@sisk.pl>
2010-01-19 1:19 ` KOSAKI Motohiro
[not found] ` <20100119101101.5F2E.A69D9226@jp.fujitsu.com>
2010-01-19 3:19 ` Benjamin Herrenschmidt
[not found] ` <1263871194.724.520.camel@pasglop>
2010-01-19 9:04 ` Bastien ROUCARIES
2010-01-19 20:47 ` Rafael J. Wysocki
[not found] ` <195c7a901001190104x164381f9v4a58d1fce70b17b6@mail.gmail.com>
2010-01-19 23:17 ` Benjamin Herrenschmidt
[not found] ` <1263943071.724.540.camel@pasglop>
2010-01-20 11:31 ` Oliver Neukum
[not found] ` <201001201231.17540.oliver@neukum.org>
2010-01-20 21:11 ` Benjamin Herrenschmidt
2010-01-20 21:12 ` Rafael J. Wysocki
[not found] ` <201001192147.58185.rjw@sisk.pl>
2010-01-20 0:33 ` KOSAKI Motohiro
[not found] ` <20100120085053.405A.A69D9226@jp.fujitsu.com>
2010-01-20 21:21 ` Rafael J. Wysocki
2010-01-20 21:21 ` Rafael J. Wysocki
[not found] ` <201001202221.34804.rjw@sisk.pl>
2010-01-21 0:47 ` KOSAKI Motohiro
[not found] ` <20100121091023.3775.A69D9226@jp.fujitsu.com>
2010-01-21 20:21 ` Rafael J. Wysocki
[not found] ` <201001212121.50272.rjw@sisk.pl>
2010-01-21 20:42 ` Nigel Cunningham
[not found] ` <4B58BC31.1040406@crca.org.au>
2010-01-21 21:38 ` Rafael J. Wysocki
2010-01-22 1:31 ` KOSAKI Motohiro
[not found] ` <20100122100155.6C03.A69D9226@jp.fujitsu.com>
2010-01-22 1:42 ` KOSAKI Motohiro
[not found] ` <20100122103830.6C09.A69D9226@jp.fujitsu.com>
2010-01-22 10:11 ` Maxim Levitsky
[not found] ` <1264155067.15930.4.camel@maxim-laptop>
2010-01-22 21:19 ` [Update][PATCH] MM / PM: Force GFP_NOIO during suspend/hibernation and resume Rafael J. Wysocki
[not found] ` <201001222219.15958.rjw@sisk.pl>
2010-01-23 9:29 ` Maxim Levitsky
[not found] ` <1264238962.16031.4.camel@maxim-laptop>
2010-01-25 21:49 ` Rafael J. Wysocki
[not found] ` <201001252249.18690.rjw@sisk.pl>
2010-01-25 21:52 ` Alexey Starikovskiy
[not found] ` <4B5E1281.7090700@suse.de>
2010-01-30 18:56 ` Rafael J. Wysocki
[not found] ` <201001301956.41372.rjw@sisk.pl>
2010-01-30 20:42 ` Maxim Levitsky
[not found] ` <1264884140.13861.7.camel@maxim-laptop>
2010-01-30 20:53 ` Rafael J. Wysocki
2010-01-22 20:58 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: Memory allocations in .suspend became very unreliable) Rafael J. Wysocki
2010-01-30 15:46 ` Maxim Levitsky
[not found] ` <1264866419.27933.0.camel@maxim-laptop>
2010-01-30 18:47 ` Rafael J. Wysocki
[not found] ` <201001301947.10453.rjw@sisk.pl>
2010-01-30 20:37 ` Maxim Levitsky
[not found] ` <1264883863.13861.3.camel@maxim-laptop>
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=201001162317.39940.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-pm@lists.linux-foundation.org \
--cc=maximlevitsky@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