From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: linux-kernel@vger.kernel.org, ncunningham@cyclades.com
Cc: Dave Hansen <haveblue@us.ibm.com>, Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH] Free swap suspend from dependency on PageReserved
Date: Thu, 6 Oct 2005 10:28:09 +0200 [thread overview]
Message-ID: <200510061028.10237.rjw@sisk.pl> (raw)
In-Reply-To: <1128551062.10363.41.camel@localhost>
Hi Nigel,
On Thursday, 6 of October 2005 00:24, Nigel Cunningham wrote:
> Hi Dave.
>
> On Thu, 2005-10-06 at 08:03, Dave Hansen wrote:
> > On Thu, 2005-10-06 at 07:04 +1000, Nigel Cunningham wrote:
> > >
> > > + for (tmp = 0; tmp < max_low_pfn; tmp++, addr += PAGE_SIZE) {
> > > + if (page_is_ram(tmp)) {
> > > + /*
> > > + * Only count reserved RAM pages
> > > + */
> > > + if (PageReserved(mem_map+tmp))
> > > + reservedpages++;
> >
> > Please don't reference mem_map[] directly outside of #ifdef
> > CONFIG_FLATMEM areas. It is not defined for all config cases. Please
> > use pfn_to_page(), instead. It should work in all cases where the page
> > is valid.
> >
> > Also, instead of keeping addr defined like you do, and comparing it
> > during each run of the loop, why not just use pfn_is_nosave(), which is
> > already defined? Then, you won't even need the variable.
>
> Thanks for the comments. Will revise and resend.
There's one more reference to PageReserved() in swsusp.c, which is
in save_highmem_zone(). You seem to omit this one (or I have missed
it in your patch in which case please ignore this message). Is that
intentional?
Rafael
next prev parent reply other threads:[~2005-10-06 8:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-05 21:04 Nigel Cunningham
2005-10-05 22:03 ` Dave Hansen
2005-10-05 22:24 ` Nigel Cunningham
2005-10-06 8:28 ` Rafael J. Wysocki [this message]
2005-10-06 10:14 ` Nick Piggin
2005-10-07 5:33 ` Nigel Cunningham
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=200510061028.10237.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncunningham@cyclades.com \
--cc=pavel@ucw.cz \
/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
Powered by JetHome