Unity8 needs to have CAP_SYS_RESOURCE set to be able to adjust oom[_score]_adj for lifecycle mgmt
Bug #1238691 reported by
Thomas Voß
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unity-mir (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
unity8 (Ubuntu) |
Fix Released
|
High
|
Loïc Minier |
Bug Description
In order to fully enable our lifecycle mgmt, Unity8 needs to adjust the OOM score of applications when they are in the background such that it is more likely that they will get selected the low memory killer. For this to work, Unity8 needs to be able to adjust /proc/pid/
Related branches
lp:~thomas-voss/unity8/add_post_inst_script_to_gain_cap_sys_resource
- Marc Deslauriers: Approve
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
- Michał Sawicz: Needs Fixing
- Didier Roche-Tolomelli: Approve
-
Diff: 24 lines (+19/-0)1 file modifieddebian/unity8.postinst (+19/-0)
lp:~lool/unity8/unity8-setcap
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
- Michał Sawicz: Approve
-
Diff: 58 lines (+35/-0)3 files modifieddata/unity8-setcap.conf (+32/-0)
debian/control (+2/-0)
debian/unity8.install (+1/-0)
lp:~thomas-voss/unity-mir/oom_adjust
- Gerry Boland (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
- Mir development team: Pending requested
-
Diff: 250 lines (+212/-0)1 file modifiedsrc/modules/Unity/Application/taskcontroller.cpp (+212/-0)
Changed in unity8: | |
assignee: | nobody → Gerry Boland (gerboland) |
importance: | Undecided → High |
status: | New → Triaged |
Changed in unity8: | |
assignee: | Gerry Boland (gerboland) → Loïc Minier (lool) |
status: | Triaged → Fix Released |
status: | Fix Released → Fix Committed |
Changed in unity8: | |
status: | Fix Committed → Fix Released |
tags: | added: needs-ap-test |
affects: | unity8 → unity8 (Ubuntu) |
To post a comment you must log in.
I have given approval for the Unity 8 binary to gain CAP_SYS_RESOURCE via fscaps. It can be set using setcap in the package postinst.
I don't believe there are any escalation issues with CAP_SYS_RESOURCE, and it makes sense for Unity 8 to manage application lifecycle.
That being said, if we do discover that giving Unity 8 CAP_SYS_RESOURCE is problematic in the future, we can simply move the oom_score_adj code to it's own small helper daemon without too much work.