All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@cyclades.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: Pavel Machek <pavel@ucw.cz>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Free swap suspend from dependency on PageReserved
Date: Thu, 06 Oct 2005 08:24:22 +1000	[thread overview]
Message-ID: <1128551062.10363.41.camel@localhost> (raw)
In-Reply-To: <1128549812.18249.8.camel@localhost>

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.

Regards,

Nigel

> -- Dave
-- 



  reply	other threads:[~2005-10-05 22:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-05 21:04 [PATCH] Free swap suspend from dependency on PageReserved Nigel Cunningham
2005-10-05 22:03 ` Dave Hansen
2005-10-05 22:24   ` Nigel Cunningham [this message]
2005-10-06  8:28     ` Rafael J. Wysocki
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=1128551062.10363.41.camel@localhost \
    --to=ncunningham@cyclades.com \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.