RE: [RFC/PATCH] pfn_valid() more generic : arch independent part[0/2]

From: Martin J. Bligh <>
Date: 2004-10-08 02:02:57
--"Luck, Tony" <> wrote (on Thursday, October 07, 2004 08:53:32 -0700):

>> The normal way to fix the above is just to have a bitmap array 
>> to test - in your case a 1GB granularity would be sufficicent. That 
>> takes < 1 word to implement for the example above ;-)
> In the general case you need a bit for each granule (since that is the
> unit that the kernel admits/denies the existence of memory).  But the
> really sparse systems end up with a large bitmap.  SGI Altix uses 49
> physical address bits, and a granule size of 16MB ... so we need 2^25
> bits ... i.e. 4MBbytes.  While that's a drop in the ocean on a 4TB
> machine, it still seems a pointless waste.

If it's that sparse, it might be worth having another data structure,
perhaps a tree, or some form of hierarchical bitmap. But probably the
most important thing is to do it in one cacheline read, so personally
I'd stick with the array. Whatever you chose, I still don't understand 
where all that code came from ;-)


To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Thu Oct 7 12:08:14 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:31 EST