Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 555488 - openrc lacks support for some cgroup controllers
Summary: openrc lacks support for some cgroup controllers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-20 15:23 UTC by Austin S. Hemmelgarn
Modified: 2015-10-06 21:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to add support for hugetlb, net_cls, and pids cgroup controllers to openrc (file_555488.txt,993 bytes, patch)
2015-07-20 15:32 UTC, Austin S. Hemmelgarn
Details | Diff
Updated patch for hugetlb, net_cls, and pids cgroup controllers (file_555488.txt,995 bytes, patch)
2015-07-20 18:48 UTC, Austin S. Hemmelgarn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Austin S. Hemmelgarn 2015-07-20 15:23:26 UTC
As things stand right now, there are 4 cgroup controllers in the kernel that openrc doesn't actually support setting up:
1. freezer
2. hugetlb
3. net_cls
4. perf_event

Of these, I will admit that freezer is pretty pointless for most openrc started services, and perf_event is not particularly useful in such contexts as well.  hugetlb and net_cls however are useful, nd there is no code supporting them in openrc.

Furthermore, in either linux 4.2 or 4.3 (I can't remember which the patches were queued for), there will be another controller for limiting the number of pids used by a cgroup, and this is extremely useful for some services.

It would be nice to see support for these cgroup controllers in openrc.
Comment 1 Austin S. Hemmelgarn 2015-07-20 15:32:09 UTC
Created attachment 407272 [details, diff]
Patch to add support for hugetlb, net_cls, and pids cgroup controllers to openrc

The attached patch adds support to openrc for the hugetlb, net_cls and (soon to be released) pids cgroup controllers.

It has been lightly tested on amd64 and x86 systems.
Comment 2 Austin S. Hemmelgarn 2015-07-20 18:48:43 UTC
Created attachment 407290 [details, diff]
Updated patch for hugetlb, net_cls, and pids cgroup controllers

The previous patch I posted had some (admittedly rather stupid) that meant it wouldn't work on certain configurations.  This version remedies those issues.
Comment 3 William Hubbs gentoo-dev 2015-10-06 21:50:14 UTC
This has been added in commit 80d3928.
I reordered your patch a bit and added the documented settings in
rc.conf.