All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zefan Li <lizefan@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: "Christian Brauner" <christianvanbrauner@gmail.com>,
	"Serge Hallyn" <serge.hallyn@ubuntu.com>,
	"Stéphane Graber" <stgraber@ubuntu.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Cgroups <cgroups@vger.kernel.org>
Subject: Re: [PATCH 1/3] cpuset: initialize effective masks when clone_children is enabled
Date: Mon, 2 Mar 2015 14:16:35 +0800	[thread overview]
Message-ID: <54F40043.9050201@huawei.com> (raw)
In-Reply-To: <54DD6D55.2070603@huawei.com>

Hi Tejun,

Could you pick up those bug fixes? Or should I ask Ingo/akpm to take
care of them?

On 2015/2/13 11:19, Zefan Li wrote:
> If clone_children is enabled, effective masks won't be initialized
> due to the bug:
> 
>   # mount -t cgroup -o cpuset xxx /mnt
>   # echo 1 > cgroup.clone_children
>   # mkdir /mnt/tmp
>   # cat /mnt/tmp/
>   # cat cpuset.effective_cpus
> 
>   # cat cpuset.cpus
>   0-15
> 
> And then this cpuset won't constrain the tasks in it.
> 
> Either the bug or the fix has no effect on unified hierarchy, as
> there's no clone_chidren flag there any more.
> 
> Reported-by: Christian Brauner <christianvanbrauner@gmail.com>
> Reported-by: Serge Hallyn <serge.hallyn@ubuntu.com>
> Cc: <stable@vger.kernel.org> # 3.17+
> Signed-off-by: Zefan Li <lizefan@huawei.com>
> ---
>  kernel/cpuset.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/cpuset.c b/kernel/cpuset.c
> index 64b257f..7e9d711 100644
> --- a/kernel/cpuset.c
> +++ b/kernel/cpuset.c
> @@ -1992,7 +1992,9 @@ static int cpuset_css_online(struct cgroup_subsys_state *css)
>  
>  	spin_lock_irq(&callback_lock);
>  	cs->mems_allowed = parent->mems_allowed;
> +	cs->effective_mems = parent->mems_allowed;
>  	cpumask_copy(cs->cpus_allowed, parent->cpus_allowed);
> +	cpumask_copy(cs->effective_cpus, parent->cpus_allowed);
>  	spin_unlock_irq(&callback_lock);
>  out_unlock:
>  	mutex_unlock(&cpuset_mutex);
> 

  parent reply	other threads:[~2015-03-02  6:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13  3:19 [PATCH 1/3] cpuset: initialize effective masks when clone_children is enabled Zefan Li
2015-02-13  3:19 ` Zefan Li
     [not found] ` <54DD6D55.2070603-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-02-13  3:20   ` [PATCH 2/3] cpuset: fix a warning when clearing configured masks in old hierarchy Zefan Li
2015-02-13  3:20     ` Zefan Li
2015-02-13  3:21   ` [PATCH 1/3] cpuset: initialize effective masks when clone_children is enabled Zefan Li
2015-02-13  3:21     ` Zefan Li
2015-02-13  3:58   ` [PATCH 3/3] cpuset: Fix cpuset sched_relax_domain_level Zefan Li
2015-02-13  3:58     ` Zefan Li
2015-02-13  6:19 ` [PATCH 1/3] cpuset: initialize effective masks when clone_children is enabled Serge E. Hallyn
2015-03-02  6:16 ` Zefan Li [this message]
2015-03-02 16:55   ` 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=54F40043.9050201@huawei.com \
    --to=lizefan@huawei.com \
    --cc=cgroups@vger.kernel.org \
    --cc=christianvanbrauner@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serge.hallyn@ubuntu.com \
    --cc=stgraber@ubuntu.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 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.