diff options
author | Andrew Morton <akpm@osdl.org> | 2004-05-10 00:09:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-10 00:09:00 -0700 |
commit | cd053a9451232999d2284e2ff23e94a5047e9c70 (patch) | |
tree | 59a2648a4fe5b45a460be5170c0bfd2eac4d6010 /Documentation | |
parent | 9008d35b80e72edc52a2f3d64cefe4e2ee858329 (diff) | |
download | history-cd053a9451232999d2284e2ff23e94a5047e9c70.tar.gz |
[PATCH] Add sysctl to define a hugetlb-capable group
From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>,
"Seth, Rohit" <rohit.seth@intel.com>
This patch addresses the longstanding problem wherein Oracle needs
CAP_IPC_LOCK to allocate SHM_HUGETLB shm memory, but people don't want to run
Oracle as root, and capabilties are busted.
Various ideas with rlimits didn't work out, mainly because these objects live
beyond the lifetime of the user processes which establish them.
What we do is to create root-writeable /proc/sys/vm/hugetlb_shm_group which
specifies a single group ID. Users who belong to that group may allocate
hugepages for SHM_HUGETLB shm segments.
So the sysadmin will greate a new group, say `hugepageusers', will add the
oracle user to that group and will write that group's ID into
/proc/sys/vm/hugetlb_shm_group.
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/filesystems/proc.txt | 15 | ||||
-rw-r--r-- | Documentation/vm/hugetlbpage.txt | 9 |
2 files changed, 14 insertions, 10 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 378722d5bb704f..013d8c79da7040 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -1208,6 +1208,14 @@ On the other hand, enabling this feature can cause you to run out of memory and thrash the system to death, so large and/or important servers will want to set this value to 0. +nr_hugepages and hugetlb_shm_group +---------------------------------- + +nr_hugepages configures number of hugetlb page reserved for the system. + +hugetlb_shm_group contains group id that is allowed to create SysV shared +memory segment using hugetlb page. + 2.5 /proc/sys/dev - Device specific parameters ---------------------------------------------- @@ -1848,10 +1856,3 @@ need to recompile the kernel, or even to reboot the system. The files in the command to write value into these files, thereby changing the default settings of the kernel. ------------------------------------------------------------------------------ - - - - - - - diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt index 61ae09f49abc71..47a7121b4dc5ee 100644 --- a/Documentation/vm/hugetlbpage.txt +++ b/Documentation/vm/hugetlbpage.txt @@ -91,9 +91,12 @@ A regular chown, chgrp and chmod commands (with right permissions) could be used to change the file attributes on hugetlbfs. Also, it is important to note that no such mount command is required if the -applications are going to use only shmat/shmget system calls. It is possible -for same or different applications to use any combination of mmaps and shm* -calls. Though the mount of filesystem will be required for using mmaps. +applications are going to use only shmat/shmget system calls. Users who +wish to use hugetlb page via shared memory segment should be a member of +a supplementary group and system admin needs to configure that gid into +/proc/sys/vm/hugetlb_shm_group. It is possible for same or different +applications to use any combination of mmaps and shm* calls. Though the +mount of filesystem will be required for using mmaps. /* Example of using hugepage in user application using Sys V shared memory * system calls. In this example, app is requesting memory of size 256MB that |