Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1695958

Re: [PATCH] cgroup: remove unnecessary empty check when enabling threaded mode

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] cgroup: remove unnecessary empty check when enabling threaded mode
Date 2017-07-25 19:20 +0200
Message-ID <u7bEZ-5Ep-13@gated-at.bofh.it> (permalink)
References <u5MSl-ZJ-3@gated-at.bofh.it> <u5MSl-ZJ-5@gated-at.bofh.it> <u62X8-2z3-3@gated-at.bofh.it> <u6o1z-7p5-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/4] cgroup: Child cgroup creation not allowed on invalid domain Waiman Long <longman@redhat.com> - 2017-07-21 22:40 +0200
  Re: [PATCH v2 1/4] cgroup: Child cgroup creation not allowed on  invalid domain Tejun Heo <tj@kernel.org> - 2017-07-22 15:50 +0200
    [PATCH] cgroup: remove unnecessary empty check when enabling  threaded mode Tejun Heo <tj@kernel.org> - 2017-07-23 14:20 +0200
      Re: [PATCH] cgroup: remove unnecessary empty check when enabling  threaded mode Waiman Long <longman@redhat.com> - 2017-07-24 21:20 +0200
        [PATCH cgroup/for-4.14] cgroup: add comment to  cgroup_enable_threaded() Tejun Heo <tj@kernel.org> - 2017-07-25 19:30 +0200
      Re: [PATCH] cgroup: remove unnecessary empty check when enabling  threaded mode Tejun Heo <tj@kernel.org> - 2017-07-25 19:20 +0200
    Re: [PATCH v2 1/4] cgroup: Child cgroup creation not allowed on  invalid domain Waiman Long <longman@redhat.com> - 2017-07-24 20:00 +0200

csiph-web