lkml.org 
[lkml]   [2017]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cgroup: remove unnecessary empty check when enabling threaded mode
On Sun, Jul 23, 2017 at 08:18:26AM -0400, Tejun Heo wrote:
> cgroup_enable_threaded() checks that the cgroup doesn't have any tasks
> or children and fails the operation if so. This test is unnecessary
> because the first part is already checked by
> cgroup_can_be_thread_root() and the latter is unnecessary. The latter
> actually cause a behavioral oddity. Please consider the following
> hierarchy. All cgroups are domains.
>
> A
> / \
> B C
> \
> D
>
> If B is made threaded, C and D becomes invalid domains. Due to the no
> children restriction, threaded mode can't be enabled on C. For C and
> D, the only thing the user can do is removal.
>
> There is no reason for this restriction. Remove it.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Waiman Long <longman@redhat.com>

Applied to cgroup/for-4.14 with Waiman's ack.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2017-07-25 19:16    [W:0.534 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site