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

From: Brian Gerst (bgerst_at_didntduck.org)
Date: 11/22/05

  • Next message: Gerd Knorr: "[patch] SMP alternatives"
    Date:	Tue, 22 Nov 2005 12:46:38 -0500
    To: Andi Kleen <ak@suse.de>
    
    

    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 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/
    

  • Next message: Gerd Knorr: "[patch] SMP alternatives"

    Relevant Pages

    • Re: 2.4.x vs 2.6.x: denormal handling and audio performance
      ... > something to report. ... each one is built in the environment it runs on). ... Have you tried using the exact same binaries under both 2.4 and 2.6? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: GPL Violation of sveasoft with GPL Linux Kernel/Busybox +code
      ... > if I distribute GPLed code. ... entitled to the source code for the binaries that you received. ... doesn't send you any binaries, you don't get the source for them. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: pivot_root broken in 2.6.15-rc1-mm2
      ... > (Another is that calling chroot and such after deleting their binaries out of ... > initramfs but before the paths are adjusted so that the ones in the new root ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: vgacon fixes to help font restauration in X11
      ... > time - assuming we don't ship generic binaries or during run time if we ... > want to provide binaries that work everywhere. ... restore the extra bits in kernel". ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)