From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gao feng Subject: Re: [PATCH 04/11] pidns: Use task_active_pid_ns where appropriate Date: Wed, 21 Nov 2012 10:02:19 +0800 Message-ID: <50AC362B.9040606@cn.fujitsu.com> References: <8739097bkk.fsf@xmission.com> <1353083750-3621-1-git-send-email-ebiederm@xmission.com> <1353083750-3621-4-git-send-email-ebiederm@xmission.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1353083750-3621-4-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Eric W. Biederman" Cc: Linux Containers , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , Oleg Nesterov List-Id: containers.vger.kernel.org on 2012/11/17 00:35, Eric W. Biederman wrote: > From: "Eric W. Biederman" > > The expressions tsk->nsproxy->pid_ns and task_active_pid_ns > aka ns_of_pid(task_pid(tsk)) should have the same number of > cache line misses with the practical difference that > ns_of_pid(task_pid(tsk)) is released later in a processes life. > > Furthermore by using task_active_pid_ns it becomes trivial > to write an unshare implementation for the the pid namespace. > > So I have used task_active_pid_ns everywhere I can. > > In fork since the pid has not yet been attached to the > process I use ns_of_pid, to achieve the same effect. > > Signed-off-by: Eric W. Biederman > --- Acked-by: Gao feng