From: Benjamin LaHaise <bcrl@kvack.org>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: rfc/rft: use r10 as current on x86-64
Date: Tue, 22 Nov 2005 12:26:23 -0500 [thread overview]
Message-ID: <20051122172622.GI1127@kvack.org> (raw)
In-Reply-To: <20051122171040.GY20775@brahms.suse.de>
On Tue, Nov 22, 2005 at 06:10:42PM +0100, Andi Kleen wrote:
> I think you could get most of the benefit by just dropping
> the volatile and "memory" from read_pda(). With that gcc would
> usually CSE current into a register and it would would work essentially
> the same way with only minor more .text overhead, but r10 would be still
> available.
>
> Unfortunately when that's done then the kernel doesn't boot.
> It's probably something silly, but i never had time to track it down.
> Might want to look into that?
Without even fixing it, the difference in kernel code size is still 20K
less than what using a register does. The benefit of using a register is
that accessing a field in current can simply offset the register, compared
to the pda usage that requires loading current into a register before the
offset is performed. Using 'size' on the resulting kernels shows:
text data bss dec hex filename
4132289 819632 317256 5269177 5066b9 vmlinux.orig
4119951 819632 317256 5256839 503687 vmlinux.non-volatile
4097300 819560 317256 5234116 4fddc4 vmlinux.r10
I think that using a register makes more sense given the benefits.
-ben
--
"Time is what keeps everything from happening all at once." -- John Wheeler
Don't Email: <dont@kvack.org>.
next prev parent reply other threads:[~2005-11-22 17:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-22 16:52 rfc/rft: use r10 as current on x86-64 Benjamin LaHaise
2005-11-22 17:10 ` Andi Kleen
2005-11-22 17:26 ` Benjamin LaHaise [this message]
2005-11-22 17:46 ` Brian Gerst
2005-11-22 17:55 ` Andreas Steinmetz
2005-11-23 22:48 ` Pavel Machek
2005-11-23 22:54 ` Benjamin LaHaise
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=20051122172622.GI1127@kvack.org \
--to=bcrl@kvack.org \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox