cgroup/cpuset: Enable event notification when partition state changes
authorWaiman Long <longman@redhat.com>
Wed, 11 Aug 2021 03:06:02 +0000 (23:06 -0400)
committerTejun Heo <tj@kernel.org>
Wed, 11 Aug 2021 18:04:43 +0000 (08:04 -1000)
commite7cc9888dc57927f0977d346dab64a5bdfc3da59
tree8dfdf14085907d9548698f00e879eeb777a4b937
parentb4cc61960879025665a46085cc9b3fa334b34cc8
cgroup/cpuset: Enable event notification when partition state changes

A valid cpuset partition can become invalid if all its CPUs are offlined
or somehow removed. This can happen through external events without
"cpuset.cpus.partition" being touched at all.

Users that rely on the property of a partition being present do not
currently have a simple way to get such an event notified other than
constant periodic polling which is both inefficient and cumbersome.

To make life easier for those users, event notification is now enabled
for "cpuset.cpus.partition" whenever its state changes.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c