All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Steinmetz <ast@domdv.de>
To: Brian Gerst <bgerst@didntduck.org>
Cc: Andi Kleen <ak@suse.de>, Benjamin LaHaise <bcrl@kvack.org>,
	linux-kernel@vger.kernel.org
Subject: Re: rfc/rft: use r10 as current on x86-64
Date: Tue, 22 Nov 2005 18:55:44 +0100	[thread overview]
Message-ID: <43835BA0.6000702@domdv.de> (raw)
In-Reply-To: <4383597E.7060300@didntduck.org>

Brian Gerst wrote:
> 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.

Be aware of assembler that uses r10, e.g.
arch/x86_64/crypto/aes-x86_64-asm.S
-- 
Andreas Steinmetz                       SPAMmers use robotrap@domdv.de

  reply	other threads:[~2005-11-22 17:55 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
2005-11-22 17:46   ` Brian Gerst
2005-11-22 17:55     ` Andreas Steinmetz [this message]
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=43835BA0.6000702@domdv.de \
    --to=ast@domdv.de \
    --cc=ak@suse.de \
    --cc=bcrl@kvack.org \
    --cc=bgerst@didntduck.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.