• N
    resgroup: detect gpdb cgroup comp dirs automatically. · 9f4c6926
    Ning Yu 提交于
    Take cpu for example, by default we expect gpdb dir to locate at
    cgroup/cpu/gpdb.  But we'll also check for the cgroup dirs of init
    process (pid 1), e.g. cgroup/cpu/custom, then we'll look for gpdb dir at
    cgroup/cpu/custom/gpdb, if it's found and has good permissions, it can
    be used instead of the default one.
    
    If any of the gpdb cgroup component dir can not be found under init
    process' cgroup dirs or has bad permissions we'll fallback all the gpdb
    cgroup component dirs to the default ones.
    
    NOTE: This auto detection will look for memory & cpuset gpdb dirs even
    on 5X.
    
    (cherry picked from commit f3dc101a)
    9f4c6926
resgroup.c 104.7 KB