mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: ebiederm@xmission.com (Eric W. Biederman)
Cc: 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 03:16:35 -0700	[thread overview]
Message-ID: <20060711031635.a6a1f759.akpm@osdl.org> (raw)
In-Reply-To: <m1bqrwkb0u.fsf@ebiederm.dsl.xmission.com>

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.

  reply	other threads:[~2006-07-11 10:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-11  4:42 Eric W. Biederman
2006-07-11 10:16 ` Andrew Morton [this message]
2006-07-11 13:08   ` Nick Piggin
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=20060711031635.a6a1f759.akpm@osdl.org \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome