Re: [PATCH 1/4] compcache: xvmalloc memory allocator

From: Christoph Lameter
Date: Wed Aug 26 2009 - 12:08:22 EST

On Tue, 25 Aug 2009, Nitin Gupta wrote:

> PFNs are 32-bit on all archs while for 'struct page *', we require 32-bit or
> 64-bit depending on arch. ramzswap allocates a table entry <pagenum, offset>
> corresponding to every swap slot. So, the size of table will unnecessarily
> increase on 64-bit archs. Same is the argument for xvmalloc free list sizes.

Wrong. PFNs must be longer than 32 bit otherwise a system cannot
address more than 2^12 + 2^32 = 2^44 => 16TB.

The type used for PFNs is unsigned long which are 64 bit on 64 bit platforms.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at