]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpuset: consider dying css as offline
authorTejun Heo <tj@kernel.org>
Wed, 24 May 2017 16:03:48 +0000 (12:03 -0400)
committerAllen Pais <allen.pais@oracle.com>
Tue, 18 Jul 2017 12:25:01 +0000 (17:55 +0530)
commit590c5040e5a3517b16e4e1bd17d805114d999196
treebe5ccd7449778b51f370f6467239bfefc4f26a25
parent2c330d7143d786edcfd0eecc96a44aab2a737b3b
cpuset: consider dying css as offline

In most cases, a cgroup controller don't care about the liftimes of
cgroups.  For the controller, a css becomes online when ->css_online()
is called on it and offline when ->css_offline() is called.

However, cpuset is special in that the user interface it exposes cares
whether certain cgroups exist or not.  Combined with the RCU delay
between cgroup removal and css offlining, this can lead to user
visible behavior oddities where operations which should succeed after
cgroup removals fail for some time period.  The effects of cgroup
removals are delayed when seen from userland.

This patch adds css_is_dying() which tests whether offline is pending
and updates is_cpuset_online() so that the function returns false also
while offline is pending.  This gets rid of the userland visible
delays.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Link:
http://lkml.kernel.org/r/327ca1f5-7957-fbb9-9e5f-9ba149d40ba2@oracle.com
Cc: stable@vger.kernel.org
Signed-off-by: Tejun Heo <tj@kernel.org>
Orabug: 26415290

(backport upstream commit 41c25707d21716826e3c1f60967f5550610ec1c9)

Signed-off-by: Thomas Tai <thomas.tai@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
Reviewed-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: Dhaval Giani <dhaval.giani@oracle.com>
include/linux/cgroup.h
kernel/cpuset.c