public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@osdl.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH -mm 0/2] mm: shrink_all_memory improvements
Date: Mon, 27 Feb 2006 19:33:02 +0100	[thread overview]
Message-ID: <20060227183302.GE2955@elf.ucw.cz> (raw)
In-Reply-To: <200602271926.20294.rjw@sisk.pl>

Hi!

> The following two patches are designed to improve the shrink_all_memory()
> function used by swsusp and other pm functions.
> 
> The first patch makes shrink_all_memory() overflow-resistant.  The problem is
> that, AFAICT, balance_pgdat(pgdat, nr_to_free, 0) may free more than nr_to_free
> pages, in which case nr_to_free, being unsigned, will overflow (and obviously
> it cannot be less than 0).  Also if the argument is too big, strange things may
> happen.
> 
> The first patch adds a workaround of the problem that shrink_all_memory() may
> return 0 even if there still are some pages to free.  WIth this patch applied
> it sometimes frees 2 times as many pages as without it on my box.
> 
> Please have a look and comment.

ACK on the first one, Andrew, please suggest how to do the second one
better.
								Pavel
-- 
Web maintainer for suspend.sf.net (www.sf.net/projects/suspend) wanted...

      parent reply	other threads:[~2006-02-27 18:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27 18:26 [RFC][PATCH -mm 0/2] mm: shrink_all_memory improvements Rafael J. Wysocki
2006-02-27 18:28 ` [RFC][PATCH -mm 1/2] mm: make shrink_all_memory overflow-resistant Rafael J. Wysocki
2006-02-27 18:53   ` Jesper Juhl
2006-02-27 19:02     ` Pavel Machek
2006-02-27 19:06       ` Jesper Juhl
2006-02-27 23:15     ` Rafael J. Wysocki
2006-02-28  3:16   ` Andrew Morton
2006-02-28 17:28     ` Rafael J. Wysocki
2006-02-27 18:30 ` [RFC][PATCH -mm 2/2] mm: make shrink_all_memory try harder Rafael J. Wysocki
2006-02-28  3:25   ` Andrew Morton
2006-02-28 17:25     ` Rafael J. Wysocki
2006-02-28 18:46       ` Andrew Morton
2006-02-28 23:04         ` Rafael J. Wysocki
2006-02-27 18:33 ` Pavel Machek [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=20060227183302.GE2955@elf.ucw.cz \
    --to=pavel@suse.cz \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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