From: Paul Menage <menage@google.com>
To: Dhaval Giani <dhaval.giani@gmail.com>
Cc: balbir@linux.vnet.ibm.com, peterz@infradead.org,
lennart@poettering.net, jsafrane@redhat.com, tglx@linutronix.de,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH/RFC] Have sane default values for cpusets
Date: Thu, 13 May 2010 13:12:42 -0700 [thread overview]
Message-ID: <o2j6599ad831005131312jfef915b5g9cc7c96761742977@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimxO3xWmr8jgyiwsLNyqTJ-4OWJ4zNROC9SE7XH@mail.gmail.com>
On Wed, May 12, 2010 at 12:59 PM, Dhaval Giani <dhaval.giani@gmail.com> wrote:
> On Wed, May 12, 2010 at 9:36 PM, Paul Menage <menage@google.com> wrote:
>> On Wed, May 12, 2010 at 12:29 PM, Dhaval Giani <dhaval.giani@gmail.com> wrote:
>>>> I think the idea is reasonable - the only way that I could see it
>>>> breaking someone would be code that currently does something like:
>>>>
>>>> mkdir A
>>>> mkdir B
>>>> echo 1 > A/mem_exclusive
>>>> echo 1 > B/mem_exclusive
>>>> echo $mems_for_a > A/mems
>>>> echo $mems_for_b > B/mems
>>>>
>>>> The attempts to set the mem_exclusive flags would fail, since A and B
>>>> would both have all of the parent's mems.
>>>>
>>>
>>> But would this not fail otherwise?
>>>
>>
>> Assuming that mems_for_a and mems_for_b were disjoint, it would be
>> fine currently.
>>
>
> Ah my bad. I misread mems_for_a as taking the value from the parent.
> You are right, that was a case I missed.
>
> Hmm, so how do we fix this? Any solutions? Not fixing the kernel
> pushes the problem to the userspace, making it hard for tons of more
> applications to use cgroups without jumping through a lot of hoops.
>
Well, it's not clear to me whether the case I outlined is actually one
that would bite people - it's likely a rare case.
Balbir's point that some apps might get upset by finding non-empty
mems/cpus in a newly-created cgroup is more reasonable.
How about a per-cgroup cpuset.inherit_defaults file that defaults to
false and is inherited from the parent. If the parent's file is set to
true, then the mems/cpus are also inherited?
Then the sysadmin who's giving out user-controllable cpuset-based
cgroups can just set it to true and the users don't need to worry
about setting up the defaults.
Paul
next prev parent reply other threads:[~2010-05-13 20:12 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-12 13:05 [PATCH/RFC] Have sane default values for cpusets Dhaval Giani
2010-05-12 13:40 ` Peter Zijlstra
2010-05-12 13:46 ` Dhaval Giani
2010-05-12 19:01 ` Paul Menage
2010-05-12 19:10 ` Dhaval Giani
2010-05-12 19:20 ` Paul Menage
2010-05-12 19:29 ` Dhaval Giani
2010-05-12 19:36 ` Paul Menage
2010-05-12 19:39 ` Balbir Singh
2010-05-12 19:59 ` Dhaval Giani
2010-05-13 10:26 ` Dhaval Giani
2010-05-13 10:52 ` Balbir Singh
2010-05-13 20:12 ` Paul Menage [this message]
2010-05-13 20:16 ` Dhaval Giani
2010-05-13 20:19 ` Dhaval Giani
2010-05-12 19:30 ` Balbir Singh
[not found] <eJjRf-6YM-1@gated-at.bofh.it>
[not found] ` <eJktY-7JG-7@gated-at.bofh.it>
[not found] ` <eJktY-7JG-5@gated-at.bofh.it>
2010-05-12 14:11 ` James Kosin
2010-05-12 14:13 ` Dhaval Giani
2010-05-12 14:20 ` Peter Zijlstra
2010-05-12 14:22 ` Dhaval Giani
2010-05-12 14:40 ` Jan Safranek
[not found] ` <4BEAE7A1.2010001@intcomgrp.com>
2010-05-12 17:42 ` Dhaval Giani
2010-05-12 17:58 ` James Kosin
2010-05-12 18:04 ` Chris Friesen
2010-05-12 18:27 ` Balbir Singh
2010-05-12 19:07 ` Lennart Poettering
2010-05-13 13:01 ` Peter Zijlstra
2010-05-13 14:03 ` Lennart Poettering
2010-05-13 20:06 ` Paul Menage
2010-05-13 20:36 ` Lennart Poettering
2010-05-13 20:41 ` Lennart Poettering
2010-05-13 21:07 ` Balbir Singh
2010-05-13 23:55 ` Lennart Poettering
2010-05-14 5:44 ` Balbir Singh
2010-05-14 6:34 ` Dhaval Giani
2010-05-13 21:29 ` Paul Menage
2010-05-13 21:19 ` Peter Zijlstra
2010-05-14 0:02 ` Lennart Poettering
2010-05-14 5:43 ` Balbir Singh
2010-05-14 6:53 ` Peter Zijlstra
2010-05-14 8:12 ` Balbir Singh
2010-05-14 10:38 ` Peter Zijlstra
2010-05-14 11:57 ` Dhaval Giani
2010-05-14 16:07 ` Lennart Poettering
2010-05-14 6:51 ` Peter Zijlstra
2010-05-14 7:23 ` Peter Zijlstra
2010-05-14 8:11 ` Balbir Singh
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=o2j6599ad831005131312jfef915b5g9cc7c96761742977@mail.gmail.com \
--to=menage@google.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=dhaval.giani@gmail.com \
--cc=jsafrane@redhat.com \
--cc=lennart@poettering.net \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).