This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 981457 - file memory.memsw.limit_in_bytes (control file of memory cgroup controller) doesn't work with realtime kernel
file memory.memsw.limit_in_bytes (control file of memory cgroup controller) d...
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: realtime-kernel (Show other bugs)
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Arnaldo Carvalho de Melo
MRG Quality Engineering
Depends On:
  Show dependency treegraph
Reported: 2013-07-04 15:06 EDT by Martin Bukatovic
Modified: 2013-08-27 11:09 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-27 11:09:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Martin Bukatovic 2013-07-04 15:06:39 EDT
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
# rpm -qa | grep cgroup

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:


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 

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.
Comment 1 Jiri Kastner 2013-07-08 06:28:03 EDT
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.

so i would like to have mentioned somewhere, that on realtime kernel are some limitations regarding cgroups.
Comment 2 Arnaldo Carvalho de Melo 2013-07-16 15:32:55 EDT
Can you try the kernel-rt-3.8 kernel with the "swapaccount" kernel command line option present?

                        [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)
Comment 3 Arnaldo Carvalho de Melo 2013-07-16 15:35:18 EDT
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-
Checking out files: 100% (22348/22348), done.
Switched to branch 'local-mrg-rt-'
[acme@sandy mrg-linux]$ grep CONFIG_MEMCG_SWAP MRG/kernel-rt-x86_64-rt.config 
[acme@sandy mrg-linux]$
Comment 4 Jiri Kastner 2013-07-17 09:37:33 EDT
[root@dhcp-27-86 foo]# pwd
[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
[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
Comment 5 Clark Williams 2013-08-27 11:09:35 EDT
Published kbase article to document this behavior

Note You need to log in before you can comment on or make changes to this bug.