linux-mips
[Top] [All Lists]

Re: [PATCH] do not count pages in holes with sparsemem

To: vagabon.xyz@gmail.com
Subject: Re: [PATCH] do not count pages in holes with sparsemem
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Mon, 10 Jul 2006 23:34:54 +0900 (JST)
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <cda58cb80607100434h13831eb7rc6eda13a0d9e373f@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <cda58cb80607060805yc656114p53516b904188c20f@mail.gmail.com> <20060707.002602.75184460.anemo@mba.ocn.ne.jp> <cda58cb80607100434h13831eb7rc6eda13a0d9e373f@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
On Mon, 10 Jul 2006 13:34:06 +0200, "Franck Bui-Huu" <vagabon.xyz@gmail.com> 
wrote:
> could you put the diffstat next time ?

Sure.  I'll do it.

> can we use pfn_valid() instead of page_is_ram() ? bootmem_init() and
> sparse_init() have already been called so pfn_valid() should be safe
> here....

We can, but we can get more precise value using page_is_ram().  The
pfn_valid() returns true for _all_ pages on present section, and
currently the section size is 256MB.

> > -       max_mapnr = num_physpages = highend_pfn;
> > +       max_mapnr = highend_pfn;
> >  #else
> > -       max_mapnr = num_physpages = max_low_pfn;
> > +       max_mapnr = max_low_pfn;
> 
> this is not always true, specially if FLATMEM set and your physical mem
> do not start at 0.

Yes, and I think you are preparing a patch for these systems ;-)

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>