[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0908242132320.8144@sister.anvils>
Date: Mon, 24 Aug 2009 21:39:02 +0100 (BST)
From: Hugh Dickins <hugh.dickins@...cali.co.uk>
To: Nitin Gupta <ngupta@...are.org>
cc: Pekka Enberg <penberg@...helsinki.fi>, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-mm-cc@...top.org
Subject: Re: [PATCH 1/4] compcache: xvmalloc memory allocator
On Tue, 25 Aug 2009, Nitin Gupta wrote:
> On 08/24/2009 11:03 PM, Pekka Enberg wrote:
> >
> > What's the purpose of passing PFNs around? There's quite a lot of PFN
> > to struct page conversion going on because of it. Wouldn't it make
> > more sense to return (and pass) a pointer to struct page instead?
>
> PFNs are 32-bit on all archs
Are you sure? If it happens to be so for all machines built today,
I think it can easily change tomorrow. We consistently use unsigned long
for pfn (there, now I've said that, I bet you'll find somewhere we don't!)
x86_64 says MAX_PHYSMEM_BITS 46 and ia64 says MAX_PHYSMEM_BITS 50 and
mm/sparse.c says
unsigned long max_sparsemem_pfn = 1UL << (MAX_PHYSMEM_BITS-PAGE_SHIFT);
Hugh
--
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