[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F83FBD6.6030104@debian.org>
Date: Tue, 10 Apr 2012 11:22:30 +0200
From: Per Olofsson <pelle@...ian.org>
To: Bojan Smojver <bojan@...ursive.com>
CC: "Rafael J. Wysocki" <rjw@...k.pl>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v9]: Hibernation: fix the number of pages used for hibernate/thaw
buffering
On 2012-04-10 11:19, Bojan Smojver wrote:
> On Tue, 2012-04-10 at 10:40 +0200, Per Olofsson wrote:
>> 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.
>
> Actually, nr_free_highpages() does a loop very similar to the one in the
> patch. So, you would then have that and nr_free_pages() invocation.
> That's why I went with just the loop.
>
> Make sense?
>
If you don't have any high pages (e.g. x86_64), then nr_free_highpages()
is defined to be 0 and is optimized away completely.
Still, it seems you are not calculating free pages that often anymore so
it should not matter much.
--
Pelle
--
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