runc/libcontainer/cgroups
Kir Kolyshkin 5542a2c77d libcontainer/cgroups: GetAllPids: optimize
1. Return earlier if there is an error.

2. Do not use filepath.Split on every entry, use info.Name() instead.

3. Make readProcsFile() accept file name as an argument, to avoid
   unnecessary file name and directory splitting and merging.

4. Skip on info.IsDir() -- this avoids an error when cgroup name is
   set to "cgroup.procs".

This is still not very good since filepath.Walk() performs an unnecessary
stat(2) on every entry, but better than before.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-03-20 12:27:36 -07:00
..
ebpf cgroup2: ebpf: increase RLIM_MEMLOCK to avoid BPF_PROG_LOAD error 2019-11-07 15:43:27 +09:00
fs Fix skip message for cgroupv2 2020-02-03 14:27:12 +02:00
fs2 cgroup2: add CpuMax conversion 2020-03-13 02:58:39 +09:00
fscommon cgroup2: split fs2 from fs 2019-12-06 15:42:10 +09:00
systemd libcontainer: simplify createCgroupsv2Path 2020-03-20 11:51:55 -07:00
cgroups.go libcontainer: add method to get cgroup config from cgroup Manager 2019-12-17 22:46:03 +00:00
cgroups_test.go .travis.yml: add Fedora 31 vagrant box (for cgroup2) 2019-10-31 16:53:01 +09:00
cgroups_unsupported.go Move libcontainer into subdirectory 2015-06-21 19:29:15 -07:00
stats.go Expose memory.use_hierarchy in MemoryStats 2017-03-31 13:40:34 -04:00
utils.go libcontainer/cgroups: GetAllPids: optimize 2020-03-20 12:27:36 -07:00
utils_test.go cgroup2: add CpuMax conversion 2020-03-13 02:58:39 +09:00