[PATCH 2/2] ARM: mm: use 5 bits for swapfile type encoding

Catalin Marinas catalin.marinas at arm.com
Thu Jul 26 12:49:24 EDT 2012


On Thu, Jul 26, 2012 at 05:01:08PM +0100, Will Deacon wrote:
> Page migration encodes the pfn in the offset field of a swp_entry_t.
> For LPAE, we support physical addresses of up to 36 bits (due to
> sparsemem limitations with the size of page flags), requiring 24 bits
> to represent a pfn. A further 3 bits are used to encode a swp_entry into
> a pte, leaving 5 bits for the type field. Furthermore, the core code
> defines MAX_SWAPFILES_SHIFT as 5, so the additional type bit does not
> get used.
> 
> This patch reduces the width of the type field to 5 bits, allowing us
> to create up to 31 swapfiles of 64GB each.
> 
> Signed-off-by: Will Deacon <will.deacon at arm.com>

Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>



More information about the linux-arm-kernel mailing list