Skip to content

Add cgroup management for a window

Nishal Kulkarni requested to merge nishalkulkarni/mutter:set_xattr_on_focus into main

Resource management daemon like uresourced allocates resources to a specific application based on extended attribute set on its cgroup directory. This allows for allocating resources based on an application's state.

Using mutter we can take advantage of this by setting xattr on an application whose window is focused.

These changes add a cgroup property to a MetaWindow, which is derived from the PID associated with that MetaWindow. Whenever there is a focus update event we set an inactive-since timestamp as the xattr on that particular cgroup directory and uresourced takes care of the rest.

Requirement: sd-login API

Merge request reports