[lkml]   [2005]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: rfc/rft: use r10 as current on x86-64
Andi Kleen wrote:
> On Tue, Nov 22, 2005 at 11:52:04AM -0500, Benjamin LaHaise wrote:
>> Hello Andi et al,
>> The patch below converts x86-64 to use r10 as the current pointer instead
>> of gs:pcurrent. This results in a ~34KB savings in the code segment of
>> the kernel. I've tested this with running a few regular applications,
>> plus a few 32 bit binaries. If this patch is interesting, it probably
>> makes sense to merge the thread info structure into the task_struct so
>> that the assembly bits for syscall entry can be cleaned up. Comments?
> 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.

It seems that GCC is reluctant to use the extended registers anyways
because of the rex prefix, so I don't think dedicating r10 to current
will cause that many problems.

Brian Gerst
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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