Description of problem: Some features of cgroups memory controller doesn't work on MRG RT kernel. Version-Release number of selected component (if applicable): # rpm -qa | grep kernel-rt kernel-rt-3.6.11.2-rt33.39.el6rt.x86_64 kernel-rt-firmware-3.6.11.2-rt33.39.el6rt.noarch # rpm -qa | grep cgroup libcgroup-0.37-7.2.el6_4.x86_64 How reproducible: Steps to Reproduce: 1. install and boot MRG RT kernel on RHEL 6.4 2. install libcgroup and start cgconfig service 3. create new cgroup in memory controller: mkdir /cgroup/memory/foo 4. go into the directory for the cgroup: cd /cgroup/memory/foo 5. try to read following cgroup control files: memory.memsw.failcnt memory.memsw.limit_in_bytes memory.memsw.max_usage_in_bytes memory.memsw.usage_in_bytes Actual results: # cat memory.memsw.limit_in_bytes cat: memory.memsw.limit_in_bytes: Operation not supported Expected results: # cat memory.memsw.limit_in_bytes 9223372036854775807 Additional info: Maybe it is related to BZ 921554 and some features were disabled by mistake? Nevertheless our current documentation states that it should be supported: > BZ#957802 > The rt-setup package mounted the cpuset cgroup because the Realtime > kernel only supported that cgroup. Since the most recent Realtime kernel now > supports all the cgroups except the RT Group Scheduler, this custom cgroup > mounting logic was removed from rt-setup, and a package dependency for > libcgroup was added. All cgroups supported by the Realtime kernel are now > mounted on boot by the libcgroup startup code.
tested on rt and nonrt kernels on fedora (they new not prehistoric like 2.6.32): on 3.10.0-1 (fc19@ armv7hl, x86_64), cat memory.memsw.limit_in_bytes works. on 3.9.9 (fc19@x86_64), cat memory.memsw.limit_in_bytes doesn't work. on 3.8.13-201.rt13.1.fc19.ccrma (fc19@x86_64), cat memory.memsw.limit_in_bytes doesn't work. the only kernel, where it works is 3.10. so it looks like backport from 3.10. https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-memory.html so i would like to have mentioned somewhere, that on realtime kernel are some limitations regarding cgroups.
Can you try the kernel-rt-3.8 kernel with the "swapaccount" kernel command line option present? swapaccount[=0|1] [KNL] Enable accounting of swap in memory resource controller if no parameter or 1 is given or disable it if 0 is given (See Documentation/cgroups/memory.txt)
Just checked and 3.6-rt also has this code, but, as with 3.8-rt, it needs to be explicitely enabled via the kernel command line option "swapaccount" [acme@sandy mrg-linux]$ git checkout local-mrg-rt-3.6.11.5-rt37.48 Checking out files: 100% (22348/22348), done. Switched to branch 'local-mrg-rt-3.6.11.5-rt37.48' [acme@sandy mrg-linux]$ grep CONFIG_MEMCG_SWAP MRG/kernel-rt-x86_64-rt.config CONFIG_MEMCG_SWAP=y # CONFIG_MEMCG_SWAP_ENABLED is not set [acme@sandy mrg-linux]$
[root@dhcp-27-86 foo]# pwd /cgroup/memory/foo [root@dhcp-27-86 foo]# for x in failcnt limit_in_bytes max_usage_in_bytes usage_in_bytes; do cat memory.memsw.$x;done 0 9223372036854775807 0 0 [root@dhcp-27-86 foo]# cat /proc/cmdline ro root=UUID=2836fea9-54d5-4ea6-9d40-5ae6e2a33ab8 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=128M quiet swapaccount=1 [root@dhcp-27-86 foo]# uname -r 3.8.13-rt13.14.el6rt.x86_64
Published kbase article to document this behavior https://access.redhat.com/site/solutions/453813