Re: rfc/rft: use r10 as current on x86-64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: <[email protected]>.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux