[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090210202545.GG1382@ucw.cz>
Date: Tue, 10 Feb 2009 21:25:45 +0100
From: Pavel Machek <pavel@...e.cz>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Jesse Barnes <jesse.barnes@...el.com>,
Andreas Schwab <schwab@...e.de>, Len Brown <lenb@...nel.org>,
Ingo Molnar <mingo@...e.hu>
Subject: kmalloc during suspend, was Re: PCI PM: Restore standard config
registers of all devices early
On Tue 2009-02-03 12:03:46, Benjamin Herrenschmidt wrote:
>
> > > (*) There are reasons to think that kmalloc/gfp should both silently
> > > turn into GFP_NOIO always while the suspend process is started, but
> > > that's somewhat a different subject. Rafael, did we ever act on that ?
> > > It's an old discussion we had but I don't know if we actually
> > > implemented anything.
> >
> > We have the ->prepare(), ->complete() callbacks that, among other things,
> > can be used for allocating and freeing memory with GFP_KERNEL safely.
>
> First, that's assuming drivers will be smart enough to figure that out.
> They won't, believe me.
For big alocations, I see no other way. If someone wants 100MB for
firmmware image...
> Then, as I said, this doesn't work in practice because there is no way
> drivers and/or underlying subsystems will start "remembering" when they
> are within a prepare/complete pair, and suddenly do allocations
> differently. That's just going to break.
They could set a flag in ->prepare()... but yes, drivers will get that
wrong.
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists