From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 4/4] cgroup: remove extra calls to find_existing_css_set Date: Thu, 22 Dec 2011 07:40:37 -0800 Message-ID: <20111222154037.GC17084@google.com> References: <1324527518-24461-1-git-send-email-msb@chromium.org> <1324527518-24461-4-git-send-email-msb@chromium.org> <4EF2C536.7070408@cn.fujitsu.com> <20111222094437.GO17668@somewhere> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=J8IGhNun2szUSqRV3qkU+e4lgqD4h2pHhOHdv79slfY=; b=BmK0UEoOHfu2dqqgfXEj8ew2kTdq7XBZP245USFZTxK4k4VJNU3OxykilhquIVrBcV Fx8+n0v7rs3lQAHo6KL+Lo8Do8CUyZ40puH5jisLZk7M4zB888jRQDhd9fuffuoKcPTo Ay6BOtx8/ckjDE25M50fM7PKzHSGAZBjKCsxA= Content-Disposition: inline In-Reply-To: <20111222094437.GO17668@somewhere> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Frederic Weisbecker Cc: Li Zefan , Mandeep Singh Baines , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, KAMEZAWA Hiroyuki , Oleg Nesterov , Andrew Morton , Paul Menage On Thu, Dec 22, 2011 at 10:44:39AM +0100, Frederic Weisbecker wrote: > > > if (ent.cgrp == cgrp) > > > continue; > > > + ent.cg = find_css_set(tsk->cgroups, cgrp); > > > > unfortunately This won't work, because we are holding tasklist_lock. > > I believe we can remove tasklist_lock now (in a seperate patch). > > It was there in order to protect while_each_thread() against exec but > now we have threadgroup_lock(). > > I think we only need to use rcu_read_lock() to protect against concurrent > removal in exit. Yeah, that should work and I really like this patch. kernel/cgroup.c | 152 ++++++++++++------------------------------------------- 1 files changed, 32 insertions(+), 120 deletions(-) Let's get it working. :) Thanks. -- tejun