All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Linux API <linux-api@vger.kernel.org>,
	Li Zefan <lizefan@huawei.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Paul Turner <pjt@google.com>,
	Mike Galbraith <efault@gmx.de>,
	"open list:CONTROL GROUP (CGROUP)" <cgroups@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	kernel-team@fb.com, lvenanci@redhat.com
Subject: Re: [PATCHSET for-4.11] cgroup: implement cgroup v2 thread mode
Date: Fri, 3 Feb 2017 16:56:00 -0500	[thread overview]
Message-ID: <20170203215600.GA13992@mtj.duckdns.org> (raw)
In-Reply-To: <CALCETrXrsejLG4Kuu4PawxWST-8S-LC_8U6_po-ORbZCy03sdw@mail.gmail.com>

Hello,

On Fri, Feb 03, 2017 at 01:10:21PM -0800, Andy Lutomirski wrote:
> Is this flexible enough for the real-world usecases?  For my use case

I can't think of a reason why it won't be.  Capability-wise, nothing
is being lost by the interface.

> (if I actually ported over to this), it would mean that I'd have to
> enable thread mode on the root.  What about letting a given process
> (actually mm, perhaps) live in a cgroup but let the threads be in
> different cgroups without any particular constraints.  Then
> process-wide stuff would be accounted to the cgroup that owns the
> process.

I don't know.  So, then, we basiclly have completely separate trees
for resource domains and threads.  That exactly is what mounting cpu
controller separately does.  It doesn't make sense to put them on the
same hierarchy.  Why?

> > If a controller can't possibly define how internal competition should
> > be handled, which is unlikely - the problem is being consistent and
> > sensible, defining something isn't difficult - the controller can
> > simply error out those cases either on configuration or migration.
> > Again, I'm very doubtful we'll need that but if we ever need that
> > denying specific configurations is the best we can do anyway.
> 
> I'm not sure I follow.
> 
> I'm suggesting something quite simple: let controllers that don't need
> the no-internal-process constraints set a flag so that the constraints
> don't apply if all enabled controllers have the flag set.

Firstly, I think it's better to have the rules as simple and
consistent as possible as long as we don't sacrifice critical
capabilities.

Secondly, all the major resource controllers including cpu would
eventually need resource domain, so there is no real practical upside
to doing so.

Thirdly, if we commit to something like "controller X is not subject
to no-internal-process constraint", that commitment would prevent from
ever adding domain level operations to that controller without
breaking userland visible interface.  All controllers do and have to
support process level operations.  Some controllers can do thread
level operations.  Keeping the latter opt-in doesn't block us from
adding thread mode later on.  Doing it the other way around blocks us
from adding domain level operations later on.

Thanks.

-- 
tejun

  reply	other threads:[~2017-02-03 21:56 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-02 20:06 [PATCHSET for-4.11] cgroup: implement cgroup v2 thread mode Tejun Heo
2017-02-02 20:06 ` Tejun Heo
2017-02-02 20:06 ` [PATCH 1/5] cgroup: reorganize cgroup.procs / task write path Tejun Heo
2017-02-02 20:06 ` [PATCH 2/5] cgroup: add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS Tejun Heo
2017-02-02 20:06 ` [PATCH 3/5] cgroup: introduce cgroup->proc_cgrp and threaded css_set handling Tejun Heo
2017-02-02 20:06   ` Tejun Heo
2017-02-02 20:06 ` [PATCH 4/5] cgroup: implement CSS_TASK_ITER_THREADED Tejun Heo
2017-02-02 20:06 ` [PATCH 5/5] cgroup: implement cgroup v2 thread support Tejun Heo
2017-02-02 20:06   ` Tejun Heo
2017-02-02 21:32 ` [PATCHSET for-4.11] cgroup: implement cgroup v2 thread mode Andy Lutomirski
2017-02-02 21:32   ` Andy Lutomirski
2017-02-02 21:52   ` Tejun Heo
2017-02-02 21:52     ` Tejun Heo
2017-02-03 21:10     ` Andy Lutomirski
2017-02-03 21:10       ` Andy Lutomirski
2017-02-03 21:56       ` Tejun Heo [this message]
2017-02-06  9:50     ` Peter Zijlstra
2017-02-06  9:50       ` Peter Zijlstra
2017-02-03 20:20 ` Peter Zijlstra
2017-02-03 20:20   ` Peter Zijlstra
2017-02-03 20:59   ` Tejun Heo
2017-02-03 20:59     ` Tejun Heo
2017-02-06 12:49     ` Peter Zijlstra
2017-02-06 12:49       ` Peter Zijlstra
2017-02-08 23:08       ` Tejun Heo
2017-02-08 23:08         ` Tejun Heo
2017-02-09 10:29         ` Peter Zijlstra
2017-02-09 10:29           ` Peter Zijlstra
2017-02-10 15:45           ` Tejun Heo
2017-02-10 15:45             ` Tejun Heo
2017-02-10 17:51             ` Peter Zijlstra
2017-02-10 17:51               ` Peter Zijlstra
2017-02-12  5:05               ` Tejun Heo
2017-02-12  5:05                 ` Tejun Heo
2017-02-12  6:59                 ` Mike Galbraith
2017-02-12  6:59                   ` Mike Galbraith
2017-02-13  5:45                   ` Mike Galbraith
2017-03-13 19:26                     ` Tejun Heo
2017-03-13 19:26                       ` Tejun Heo
2017-03-14 14:45                       ` Mike Galbraith
2017-02-14 10:35                 ` Peter Zijlstra
2017-03-13 20:05                   ` Tejun Heo
2017-03-13 20:05                     ` Tejun Heo
2017-03-21 12:39                     ` Peter Zijlstra
2017-03-21 12:39                       ` Peter Zijlstra
2017-03-22 14:52                       ` Peter Zijlstra
2017-03-22 14:52                         ` Peter Zijlstra
2017-02-09 13:07 ` Paul Turner
2017-02-09 14:47   ` Peter Zijlstra
2017-02-09 15:08     ` Mike Galbraith
     [not found]     ` <CAPM31RJaJjFwenC36Abij+EdzO3KBm-DEjQ_crSmzrtrrn2N2A@mail.gmail.com>
2017-02-13  5:28       ` Mike Galbraith
2017-02-10 15:46   ` Tejun Heo
2017-02-10 15:46     ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170203215600.GA13992@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=efault@gmx.de \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@fb.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=luto@amacapital.net \
    --cc=lvenanci@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.