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 /include/linux | |
| parent | 9008d35b80e72edc52a2f3d64cefe4e2ee858329 (diff) | |
[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 'include/linux')
| -rw-r--r-- | include/linux/hugetlb.h | 1 | ||||
| -rw-r--r-- | include/linux/sysctl.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 894127b192c4..deb4fe9b202b 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -30,6 +30,7 @@ void free_huge_page(struct page *); extern unsigned long max_huge_pages; extern const unsigned long hugetlb_zero, hugetlb_infinity; +extern int sysctl_hugetlb_shm_group; static inline void mark_mm_hugetlb(struct mm_struct *mm, struct vm_area_struct *vma) diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index d8929c6713d1..530911c3a186 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -163,6 +163,7 @@ enum VM_MAX_MAP_COUNT=22, /* int: Maximum number of mmaps/address-space */ VM_LAPTOP_MODE=23, /* vm laptop mode */ VM_BLOCK_DUMP=24, /* block dump mode */ + VM_HUGETLB_GROUP=25, /* permitted hugetlb group */ }; |
