lkml.org 
[lkml]   [2012]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] cgroup: simplify double-check locking in cgroup_attach_proc
Mandeep Singh Baines wrote:
> To keep the complexity of the double-check locking in one place,
> I moved the thread_group_leader check up into attach_task_by_pid.
> This allows us to use a goto instead of returning -EAGAIN.
>
> While at it, converted a couple of returns to gotos and used
> rcu for the !pid case also in order to simplify the logic.
>
> Changes in V2:
> * https://lkml.org/lkml/2011/12/22/86 (Tejun Heo)
> * Use a goto instead of returning -EAGAIN
>
> Signed-off-by: Mandeep Singh Baines <msb@chromium.org>

Acked-by: Li Zefan <lizf@cn.fujitsu.com>

> Cc: Tejun Heo <tj@kernel.org>
> Cc: Li Zefan <lizf@cn.fujitsu.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: containers@lists.linux-foundation.org
> Cc: cgroups@vger.kernel.org
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Paul Menage <paul@paulmenage.org>
> ---
> kernel/cgroup.c | 79 ++++++++++++++++++++----------------------------------
> 1 files changed, 29 insertions(+), 50 deletions(-)


\
 
 \ /
  Last update: 2012-01-05 03:09    [W:0.182 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site