lkml.org 
[lkml]   [2005]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: rfc/rft: use r10 as current on x86-64
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>.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-22 18:31    [W:0.380 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site