From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [RFC][PATCH -mm 1/2] swsusp: Free more memory Date: Mon, 23 Apr 2007 21:59:17 +0200 Message-ID: <200704232159.18003.rjw@sisk.pl> References: <200704220002.37083.rjw@sisk.pl> <200704221137.34104.rjw@sisk.pl> <1177280555.18406.71.camel@nigel.suspend2.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1177280555.18406.71.camel@nigel.suspend2.net> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: nigel@nigel.suspend2.net Cc: pm list , Pavel Machek List-Id: linux-pm@vger.kernel.org On Monday, 23 April 2007 00:22, Nigel Cunningham wrote: > Hi. > > On Sun, 2007-04-22 at 11:37 +0200, Rafael J. Wysocki wrote: > > On Sunday, 22 April 2007 01:31, Nigel Cunningham wrote: > > > Hi. > > > > > > On Sun, 2007-04-22 at 00:05 +0200, Rafael J. Wysocki wrote: > > > > From: Rafael J. Wysocki > > > > > > > > Move the definition of PAGES_FOR_IO to kernel/power/power.h and introduce > > > > SPARE_PAGES representing the number of pages that should be freed by the > > > > swsusp's memory shrinker in addition to PAGES_FOR_IO so that device drivers can > > > > allocate some memory (up to 1 MB total) in their .suspend() routines without > > > > causing the suspend to fail. > > > > > > 1MB is not going to be enough for people with DRI. I have a cycle on my > > > machine recording 3510 extra pages (13 meg) allocated during the atomic > > > copy, and I know there are others with larger numbers. > > > > I know. The other mechanism (ie. notifiers) is for them. > > > > The idea of this patch is to make it possible to _avoid_ using the notifiers > > if you need only a limited amount of memory. > > That's fine when the notifiers are actually used, but for the moment.... I know, but if I make SPARE_PAGES large enough for everyone, then no one will have any reason to use the notifiers. :-) Greetings, Rafael