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


Groups > linux.kernel > #1358173

Re: [PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource group and PRIO_RGRP

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource group and PRIO_RGRP
Date 2016-03-15 18:30 +0100
Message-ID <rd0X9-566-39@gated-at.bofh.it> (permalink)
References <rbxua-8i6-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri 11-03-16 10:41:18, Tejun Heo wrote:
> Hello,
> 
> This patchset extends cgroup v2 to support rgroup (resource group) for
> in-process hierarchical resource control and implements PRIO_RGRP for
> setpriority(2) on top to allow in-process hierarchical CPU cycle
> control in a seamless way.
> 
> cgroup v1 allowed putting threads of a process in different cgroups
> which enabled ad-hoc in-process resource control of some resources.
> Unfortunately, this approach was fraught with problems such as
> membership ambiguity with per-process resources

[Sorry if this has been already discussed, I haven't followed all the
 discussions regarding this topic]

While I agree that per-thread granularity is no fun for controllers
which operate on different than task_struct entities (like memory cgroup
controller) but I am afraid that all the complications will not go away
if we are strictly per-process anyway.

For example memcg controller is not strictly per-process either, it
operates on the mm_struct and that might be shared between different
_processes_. So we still might end up in the same schizophrenic
situation where two different processes are living in different
cgroups while one of them is silently operating in a different memcg
cgroup. I really hate this but this is what our clone(CLONE_VM) (without
CLONE_THREAD) allows to do.

I do not know about other controllers, maybe only memcg is so special,
but that would suggest that even process-only restriction might turn out
to be a problem in the future and controllers would have to face the
same problem later on.

Now I have to admit I do not have great ideas how to cover all the
possible cases but wouldn't it make more sense to allow for more
flexibility and allow thread migration while the migration can be vetoed
by any controller should it cross into a different/incompatible cgroup.

[...]

Thanks!
-- 
Michal Hocko
SUSE Labs

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


Thread

[PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource group and PRIO_RGRP Tejun Heo <tj@kernel.org> - 2016-03-11 16:50 +0100
  [PATCH 03/10] cgroup: introduce CGRP_MIGRATE_* flags Tejun Heo <tj@kernel.org> - 2016-03-11 16:50 +0100
  [PATCH 04/10] signal: make put_signal_struct() public Tejun Heo <tj@kernel.org> - 2016-03-11 16:50 +0100
  [PATCH 10/10] cgroup, sched: implement PRIO_RGRP for {set|get}priority() Tejun Heo <tj@kernel.org> - 2016-03-11 16:50 +0100
  [PATCH 08/10] cgroup: implement rgroup control mask handling Tejun Heo <tj@kernel.org> - 2016-03-11 16:50 +0100
  Example program for PRIO_RGRP Tejun Heo <tj@kernel.org> - 2016-03-11 17:10 +0100
  Re: [PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource  group and PRIO_RGRP Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-03-12 07:30 +0100
    Re: [PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource  group and PRIO_RGRP Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-03-12 18:10 +0100
      cgroup NAKs ignored? Re: [PATCHSET RFC cgroup/for-4.6] cgroup,  sched: implement resource group and PRIO_RGRP Ingo Molnar <mingo@kernel.org> - 2016-03-12 18:20 +0100
        Re: cgroup NAKs ignored? Re: [PATCHSET RFC cgroup/for-4.6] cgroup,  sched: implement resource group and PRIO_RGRP Tejun Heo <tj@kernel.org> - 2016-03-13 15:50 +0100
    Re: [PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource  group and PRIO_RGRP Tejun Heo <tj@kernel.org> - 2016-03-13 16:10 +0100
      Re: [PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource  group and PRIO_RGRP Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-03-13 18:50 +0100
      Re: [PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource  group and PRIO_RGRP Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-03-14 03:30 +0100
  Re: [PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource  group and PRIO_RGRP Peter Zijlstra <peterz@infradead.org> - 2016-03-14 12:40 +0100
  Re: [PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource  group and PRIO_RGRP Michal Hocko <mhocko@kernel.org> - 2016-03-15 18:30 +0100

csiph-web