From: Peter Zijlstra <peterz@infradead.org>
To: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: tj@kernel.org, svaidy@linux.vnet.ibm.com,
nacc@linux.vnet.ibm.com, rjw@rjwysocki.net,
linux-kernel@vger.kernel.org, lizefan@huawei.com,
anton@samba.org, bharata@linux.vnet.ibm.com,
cgroups@vger.kernel.org, paulmck@linux.vnet.ibm.com,
mingo@kernel.org, serge@hallyn.com
Subject: Re: [PATCH V2] cpuset: Add knob to make allowed masks hotplug invariant on legacy hierarchy
Date: Mon, 13 Apr 2015 16:43:11 +0200 [thread overview]
Message-ID: <20150413144311.GF5029@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <552BB3A5.9060905@linux.vnet.ibm.com>
On Mon, Apr 13, 2015 at 05:46:37PM +0530, Preeti U Murthy wrote:
> On 04/13/2015 12:31 PM, Peter Zijlstra wrote:
> > Would it not make sense to make that a mount option and limit the amount
> > of semantic variants of cpusets?
>
> I spent some time analyzing if this would be a better option than the
> sysfs knob and I think not for the following reasons:
>
> 1. Mount options tend to be generic across the controllers of a cgroup.
> But use case addressed by this patch is specific to the cpuset controller.
Surely we can get around that somehow.
> 2. The behavior that this patch is trying to bring about is not a
> drastic one to call for a mount option equivalent to the __SANE_BEHAVIOR
> one that existed earlier. This option was used to switch the legacy
> design to the default one.
>
> However this patch is not *wholly* mimicking the default hierarchy
> behavior. The behavior when cpusets become empty is left untouched for
> instance. The patch borrows one of the behaviors from the default
> hierarchy only and hence just not justify the use of a mount flag.
So the 'problem' I have is that you introduce a 3rd semantic for the
cpuset thing.
You also do not answer if you can live with the default hierarchy
behaviour, only that your patch mimicks a subset of it.
Why not all of it?
> 3. cpuset controller already has flags that allow a runtime change in
> the semantics of scheduling, memory allocation.
> Eg: CS_SCHED_LOAD_BALANCE, CS_SPREAD_PAGE. This page intends to bring
> about a runtime change in the semantics of maintaining the allowed cpus
> and mem masks in the face of hotplug. So adding a flag to take care of
> this looks better and the design falls in place.
s/page/patch/
I disagree, you change global semantics, the ONLY_ON_ROOT is a hint
here. If such a file really is the only option, then at least take the
entire semantics from default hierarchy, not only part of it.
> 4. The worry was around possible race conditions when the user tries to
> change this sysfs knob during runtime after mounting a cgroup hierarchy.
> But the sites are protected by the cpuset_lock. Moreover all of the
> cpuset behavior enforced by its flags can be changed after mounting the
> cgroup. So cpuset controller already expects twiddling of these knobs at
> will by the user.
That just doesn't parse. cpuset_lock doesn't protect anything userspace.
You cannot atomically read this flag and do something else. It being
ONLY_ON_ROOT might mean you don't even have access to the flag.
next prev parent reply other threads:[~2015-04-13 14:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 14:11 Preeti U Murthy
2015-04-11 8:35 ` Peter Zijlstra
2015-04-11 11:21 ` Preeti U Murthy
2015-04-11 13:42 ` Peter Zijlstra
2015-04-13 7:01 ` Peter Zijlstra
2015-04-13 8:25 ` Preeti U Murthy
2015-04-13 12:16 ` Preeti U Murthy
2015-04-13 14:43 ` Peter Zijlstra [this message]
2015-04-15 11:40 ` Preeti U Murthy
2015-04-15 15:03 ` Serge E. Hallyn
2015-04-15 15:19 ` Peter Zijlstra
2015-04-15 15:30 ` Serge E. Hallyn
2015-04-15 15:48 ` Tejun Heo
2015-04-15 16:15 ` Serge E. Hallyn
2015-04-15 16:18 ` Tejun Heo
2015-04-15 16:36 ` Serge E. Hallyn
2015-04-16 11:57 ` Preeti U Murthy
2015-04-20 3:28 ` Zefan Li
2015-04-13 14:50 ` Tejun Heo
2015-04-13 15:05 ` Peter Zijlstra
2015-04-15 11:12 ` Preeti U Murthy
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=20150413144311.GF5029@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=anton@samba.org \
--cc=bharata@linux.vnet.ibm.com \
--cc=cgroups@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mingo@kernel.org \
--cc=nacc@linux.vnet.ibm.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=preeti@linux.vnet.ibm.com \
--cc=rjw@rjwysocki.net \
--cc=serge@hallyn.com \
--cc=svaidy@linux.vnet.ibm.com \
--cc=tj@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome