runc/libcontainer/cgroups/fs
Qiang Huang 6fa490c664 Remove use_hierarchy check when set kernel memory
Kernel memory cannot be set in these circumstances (before kernel 4.6):
1. kernel memory is not initialized, and there are tasks in cgroup
2. kernel memory is not initialized, and use_hierarchy is enabled,
   and there are sub-cgroups

While we don't need to cover case 2 because when we set kernel
memory in runC, it's either:
- in Apply phase when we create the container, and in this case,
  set kernel memory would definitely be valid;
- or in update operation, and in this case, there would be tasks
  in cgroup, we only need to check if kernel memory is initialized
  or not.

Even if we want to check use_hierarchy, we need to check sub-cgroups
as well, but for here, we can just leave it aside.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-28 15:22:58 +08:00
..
apply_raw.go Fix trivial style errors reported by `go vet` and `golint` 2016-04-12 08:13:16 +00:00
apply_raw_test.go libcontainer: cgroups: fs: add cgroup path safety unit tests 2016-02-14 00:37:21 +11:00
blkio.go libcontainer: cgroups: don't Set in Apply 2016-01-12 10:06:35 +11:00
blkio_test.go Move the cgroups setting into a Resources struct 2015-12-16 15:53:31 -05:00
cpu.go libcontainer: cgroups: don't Set in Apply 2016-01-12 10:06:35 +11:00
cpu_test.go Fix trivial style errors reported by `go vet` and `golint` 2016-04-12 08:13:16 +00:00
cpuacct.go Rename parent and data 2015-11-05 19:12:53 +08:00
cpuset.go Move pathClean to libcontainer/utils.CleanPath 2016-02-09 16:21:58 -08:00
cpuset_test.go Move the cgroups setting into a Resources struct 2015-12-16 15:53:31 -05:00
devices.go Do not set devices cgroup entries if in a user namespace 2016-02-16 19:39:43 -08:00
devices_test.go Move the cgroups setting into a Resources struct 2015-12-16 15:53:31 -05:00
freezer.go libcontainer: cgroups: don't Set in Apply 2016-01-12 10:06:35 +11:00
freezer_test.go Move the cgroups setting into a Resources struct 2015-12-16 15:53:31 -05:00
fs_unsupported.go Move libcontainer into subdirectory 2015-06-21 19:29:15 -07:00
hugetlb.go libcontainer: cgroups: don't Set in Apply 2016-01-12 10:06:35 +11:00
hugetlb_test.go Move the cgroups setting into a Resources struct 2015-12-16 15:53:31 -05:00
memory.go Remove use_hierarchy check when set kernel memory 2016-05-28 15:22:58 +08:00
memory_test.go Merge pull request #745 from AkihiroSuda/very-trivial-style-fix 2016-04-12 13:33:00 -07:00
name.go Move the process outside of the systemd cgroup 2016-02-19 11:26:46 -08:00
net_cls.go libcontainer: cgroups: don't Set in Apply 2016-01-12 10:06:35 +11:00
net_cls_test.go Move the cgroups setting into a Resources struct 2015-12-16 15:53:31 -05:00
net_prio.go libcontainer: cgroups: don't Set in Apply 2016-01-12 10:06:35 +11:00
net_prio_test.go Move the cgroups setting into a Resources struct 2015-12-16 15:53:31 -05:00
perf_event.go Rename parent and data 2015-11-05 19:12:53 +08:00
pids.go libcontainer: cgroups: deal with unlimited case for pids.max 2016-03-18 08:46:24 +11:00
pids_test.go libcontainer: cgroups: add tests for pids.max == "max" 2016-03-18 08:46:24 +11:00
stats_util_test.go Add limit value to memory stats 2016-02-03 11:54:09 -08:00
util_test.go Move the cgroups setting into a Resources struct 2015-12-16 15:53:31 -05:00
utils.go Add more context around some error cases 2015-10-30 10:55:48 -07:00
utils_test.go Move libcontainer into subdirectory 2015-06-21 19:29:15 -07:00