diff options
author | Eric B Munson <ebmunson@us.ibm.com> | 2009-09-21 20:03:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:17:42 -0400 |
commit | 94bf5ceac095c7d4cb5e4d40fa7e2dd81d722b75 (patch) | |
tree | 5e41a60cbc7281cb68df1d4a2139933877096616 /Documentation/vm/hugetlbpage.txt | |
parent | 4e52780d41a741fb4861ae1df2413dd816ec11b1 (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.txt | 14 |
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 | |||
187 | used to change the file attributes on hugetlbfs. | 187 | used to change the file attributes on hugetlbfs. |
188 | 188 | ||
189 | Also, it is important to note that no such mount command is required if the | 189 | Also, it is important to note that no such mount command is required if the |
190 | applications are going to use only shmat/shmget system calls. Users who | 190 | applications are going to use only shmat/shmget system calls or mmap with |
191 | wish to use hugetlb page via shared memory segment should be a member of | 191 | MAP_HUGETLB. Users who wish to use hugetlb page via shared memory segment |
192 | a supplementary group and system admin needs to configure that gid into | 192 | should 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 | 193 | configure that gid into /proc/sys/vm/hugetlb_shm_group. It is possible for |
194 | applications to use any combination of mmaps and shm* calls, though the | 194 | same or different applications to use any combination of mmaps and shm* |
195 | mount of filesystem will be required for using mmap calls. | 195 | calls, though the mount of filesystem will be required for using mmap calls |
196 | without MAP_HUGETLB. For an example of how to use mmap with MAP_HUGETLB see | ||
197 | map_hugetlb.c. | ||
196 | 198 | ||
197 | ******************************************************************* | 199 | ******************************************************************* |
198 | 200 | ||