aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/vm/hugetlbpage.txt
diff options
context:
space:
mode:
authorEric B Munson <ebmunson@us.ibm.com>2009-09-21 20:03:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-22 10:17:42 -0400
commit94bf5ceac095c7d4cb5e4d40fa7e2dd81d722b75 (patch)
tree5e41a60cbc7281cb68df1d4a2139933877096616 /Documentation/vm/hugetlbpage.txt
parent4e52780d41a741fb4861ae1df2413dd816ec11b1 (diff)
hugetlb: add MAP_HUGETLB example
Add an example of how to use the MAP_HUGETLB flag to the vm documentation directory and a reference to the example in hugetlbpage.txt. Signed-off-by: Eric B Munson <ebmunson@us.ibm.com> Acked-by: David Rientjes <rientjes@google.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Adam Litke <agl@us.ibm.com> Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/vm/hugetlbpage.txt')
-rw-r--r--Documentation/vm/hugetlbpage.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt
index 3a167be78c2f..82a7bd1800b2 100644
--- a/Documentation/vm/hugetlbpage.txt
+++ b/Documentation/vm/hugetlbpage.txt
@@ -187,12 +187,14 @@ Regular chown, chgrp, and chmod commands (with right permissions) could be
187used to change the file attributes on hugetlbfs. 187used to change the file attributes on hugetlbfs.
188 188
189Also, it is important to note that no such mount command is required if the 189Also, it is important to note that no such mount command is required if the
190applications are going to use only shmat/shmget system calls. Users who 190applications are going to use only shmat/shmget system calls or mmap with
191wish to use hugetlb page via shared memory segment should be a member of 191MAP_HUGETLB. Users who wish to use hugetlb page via shared memory segment
192a supplementary group and system admin needs to configure that gid into 192should be a member of a supplementary group and system admin needs to
193/proc/sys/vm/hugetlb_shm_group. It is possible for same or different 193configure that gid into /proc/sys/vm/hugetlb_shm_group. It is possible for
194applications to use any combination of mmaps and shm* calls, though the 194same or different applications to use any combination of mmaps and shm*
195mount of filesystem will be required for using mmap calls. 195calls, though the mount of filesystem will be required for using mmap calls
196without MAP_HUGETLB. For an example of how to use mmap with MAP_HUGETLB see
197map_hugetlb.c.
196 198
197******************************************************************* 199*******************************************************************
198 200