All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: yoshfuji@linux-ipv6.org
Cc: herbert@gondor.apana.org.au, netdev@oss.sgi.com
Subject: Re: [XFRM] Make XFRM core subsystem af-independent
Date: Fri, 17 Sep 2004 17:06:07 -0700	[thread overview]
Message-ID: <20040917170607.2e96b58a.davem@davemloft.net> (raw)
In-Reply-To: <20040918.085003.77842779.yoshfuji@linux-ipv6.org>

On Sat, 18 Sep 2004 08:50:03 +0900 (JST)
YOSHIFUJI Hideaki / ^[$B5HF#1QL@^[(B <yoshfuji@linux-ipv6.org> wrote:

>  2. David's one
>     - maintenancability will be improved
>     - maintains exported symbols for binary-only modules.
>     - more function call and more stack usage.

Compiler is smarter than you think :-)

The whole stack frame is eliminated, because gcc
optimizes it away using tail-call optimizations.

Look at the assembler output for
net/ipv4/route.c:ip_route_output_key() after applying
my changes.

On sparc64 it looks like this:

ip_route_output_key:
	mov	0, %o2
	mov	0, %o3
	or	%o7, %g0, %g1
	call	ip_route_output_flow, 0
	 or	%g1, %g0, %o7

No stack frame allocated at all, it basically amounts to
a branch and clearing two argument registers.

  reply	other threads:[~2004-09-18  0:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-17 11:50 [XFRM] Make XFRM core subsystem af-independent YOSHIFUJI Hideaki / 吉藤英明
2004-09-17 12:40 ` Herbert Xu
2004-09-17 14:11   ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-17 22:35     ` David S. Miller
2004-09-17 23:50       ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-18  0:06         ` David S. Miller [this message]
2004-09-18  0:12           ` Herbert Xu
2004-09-18  1:24             ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-18  0:16           ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-18  0:10         ` Herbert Xu
2004-09-17 13:11 ` Herbert Xu

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=20040917170607.2e96b58a.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@oss.sgi.com \
    --cc=yoshfuji@linux-ipv6.org \
    /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.