From: Per Olofsson <pelle@debian.org>
To: Bojan Smojver <bojan@rexursive.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v9]: Hibernation: fix the number of pages used for hibernate/thaw buffering
Date: Tue, 10 Apr 2012 10:40:34 +0200 [thread overview]
Message-ID: <4F83F202.2080600@debian.org> (raw)
In-Reply-To: <1334026047.2103.23.camel@shrek.rexursive.com>
On 2012-04-10 04:47, Bojan Smojver wrote:
> +/*
> + * Number of free pages that are not high.
> + */
> +static unsigned long low_free_pages(void)
> +{
> + struct zone *zone;
> + unsigned long free = 0;
> +
> + for_each_populated_zone(zone)
> + if (!is_highmem(zone))
> + free += zone_page_state(zone, NR_FREE_PAGES);
> + return free;
> +}
Nitpick: it should be faster to calculate "nr_free_pages() -
nr_free_highpages()", at least on systems without high pages. But
perhaps it does not matter.
--
Pelle
next prev parent reply other threads:[~2012-04-10 8:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 2:47 [PATCH v9]: Hibernation: fix the number of pages used for hibernate/thaw buffering Bojan Smojver
2012-04-10 8:40 ` Per Olofsson [this message]
2012-04-10 9:19 ` Bojan Smojver
2012-04-10 9:22 ` Per Olofsson
2012-04-10 9:27 ` Bojan Smojver
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=4F83F202.2080600@debian.org \
--to=pelle@debian.org \
--cc=bojan@rexursive.com \
--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