hugetlbfs: per mount huge page sizes
authorAndi Kleen <[email protected]>
Thu, 24 Jul 2008 04:27:43 +0000 (21:27 -0700)
committerLinus Torvalds <[email protected]>
Thu, 24 Jul 2008 17:47:17 +0000 (10:47 -0700)
commita137e1cc6d6e7d315fef03962a2a5a113348b13b
treeb47e195c392abaa3640cc2f9187d99d58cee664a
parente5ff215941d59f8ae6bf58f6428dc5c26745a612
hugetlbfs: per mount huge page sizes

Add the ability to configure the hugetlb hstate used on a per mount basis.

- Add a new pagesize= option to the hugetlbfs mount that allows setting
  the page size
- This option causes the mount code to find the hstate corresponding to the
  specified size, and sets up a pointer to the hstate in the mount's
  superblock.
- Change the hstate accessors to use this information rather than the
  global_hstate they were using (requires a slight change in mm/memory.c
  so we don't NULL deref in the error-unmap path -- see comments).

[np: take hstate out of hugetlbfs inode and vma->vm_private_data]

Acked-by: Adam Litke <[email protected]>
Acked-by: Nishanth Aravamudan <[email protected]>
Signed-off-by: Andi Kleen <[email protected]>
Signed-off-by: Nick Piggin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/hugetlbfs/inode.c
include/linux/hugetlb.h
mm/hugetlb.c
mm/memory.c