From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932223AbWDKH1U (ORCPT ); Tue, 11 Apr 2006 03:27:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932225AbWDKH1U (ORCPT ); Tue, 11 Apr 2006 03:27:20 -0400 Received: from smtprelay01.ispgateway.de ([80.67.18.13]:1677 "EHLO smtprelay01.ispgateway.de") by vger.kernel.org with ESMTP id S932223AbWDKH1T (ORCPT ); Tue, 11 Apr 2006 03:27:19 -0400 From: Ingo Oeser To: Oleg Nesterov Subject: Re: [PATCH] de_thread: Don't confuse users do_each_thread. Date: Tue, 11 Apr 2006 09:25:07 +0200 User-Agent: KMail/1.9.1 Cc: "Eric W. Biederman" , Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org References: <20060406220403.GA205@oleg> <200604110152.38861.ioe-lkml@rameria.de> <20060411101923.GB112@oleg> In-Reply-To: <20060411101923.GB112@oleg> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604110925.08685.ioe-lkml@rameria.de> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, 11. April 2006 12:19, Oleg Nesterov wrote: > On 04/11, Ingo Oeser wrote: > > > > While you are at it: Could you please avoid calculating current over > > and over again? > > > > Just calculate it once and use the task_struct pointer. > > Ironically, de_thread() has 'tsk' parameter which is equal to 'current'. That's the thing that made me doubt :-) But thinking more about it: current cannot change within one thread, right? So all of this can be cleaned up. I'll clean them up tonight and sent out a patch against current -mm. Regards Ingo Oeser