• Andrew Morton's avatar
    [PATCH] Add sysctl to define a hugetlb-capable group · cd053a94
    Andrew Morton authored
    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.
    cd053a94
sysctl.c 50 KB