All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andrew Morton <akpm@osdl.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	linux-kernel@vger.kernel.org, oleg@tv-sign.ru,
	ioe-lkml@rameria.de
Subject: Re: [PATCH] de_thread: Use tsk not current.
Date: Tue, 11 Jul 2006 23:08:33 +1000	[thread overview]
Message-ID: <44B3A2D1.2010108@yahoo.com.au> (raw)
In-Reply-To: <20060711031635.a6a1f759.akpm@osdl.org>

Andrew Morton wrote:
> On Mon, 10 Jul 2006 22:42:25 -0600
> ebiederm@xmission.com (Eric W. Biederman) wrote:
> 
> 
>>Ingo Oeser pointed out that because current expands to an inline function it
>>is more space efficient and somewhat faster to simply keep a cached copy of
>>current in another variable.  This patch implements that for the de_thread
>>function.
>>
>>-	if (thread_group_empty(current))
>>+	if (thread_group_empty(tsk))
>>-	if (unlikely(current->group_leader == child_reaper))
>>-		child_reaper = current;
>>+	if (unlikely(tsk->group_leader == child_reaper))
>>+		child_reaper = tsk;
>>-	zap_other_threads(current);
>>+	zap_other_threads(tsk);
>> 	read_unlock(&tasklist_lock);
>>...
> 
> 
> This saves nearly 100 bytes of text on gcc-4.1.0/i686.

Why can't current be a pure function, I wonder?

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

  reply	other threads:[~2006-07-11 19:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-11  4:42 [PATCH] de_thread: Use tsk not current Eric W. Biederman
2006-07-11 10:16 ` Andrew Morton
2006-07-11 13:08   ` Nick Piggin [this message]
2006-07-12  8:52     ` Andreas Mohr

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=44B3A2D1.2010108@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=ioe-lkml@rameria.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    /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.