From: Christian Hildner <christian.hildner@hob.de>
To: linux-ia64@vger.kernel.org
Subject: Re: optimize __gp location
Date: Mon, 24 Jan 2005 07:51:17 +0000 [thread overview]
Message-ID: <41F4A8F5.3020207@hob.de> (raw)
In-Reply-To: <B05667366EE6204181EABE9C1B1C0EB50589FCE9@scsmsx401.amr.corp.intel.com>
Chen, Kenneth W schrieb:
>__gp is positioned so far out that it is almost at the end of all data
>sections. On 2.6.11-rc1, 80% of kernel data symbols are out of 22-bit
>immediate offset from __gp. This means accessing these symbols are
>unnecessarily expansive such that they have to go through global offset
>table (a memory load to get the symbol address). Among these out of
>reach symbols from __gp, some are very frequently used, like Jiffies,
>etc.
>
Wouldn't a solution using movl for the offset and then add to gp be the
cheaper solution in terms of cycles? I am wondering that there is an
additional and expensive load needed with the item possibly (likely or
not) being not in the cache. But there are the software conventions and
"nobody will ever need more than" 4MB of short data.
>Can we position the __gp somewhat more optimally, to cover more of these
>symbols? Something like the following patch would make all of them fall
>into the 22-bit immediate offset relative to gp.
>
Did you have benchmarks? Or at least a comparison of the resulting code
size. The code size should shrink when more items can be addressed
directly. Furthermore the code size should be a good indicator for the
performance gain you could achive.
Christian
next prev parent reply other threads:[~2005-01-24 7:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-21 23:22 optimize __gp location Chen, Kenneth W
2005-01-22 1:02 ` Keith Owens
2005-01-22 1:02 ` Luck, Tony
2005-01-22 2:20 ` Chen, Kenneth W
2005-01-22 3:09 ` Keith Owens
2005-01-24 7:51 ` Christian Hildner [this message]
2005-01-24 13:22 ` Keith Owens
2005-01-24 13:29 ` Matthew Wilcox
2005-01-24 13:44 ` Christian Hildner
2005-01-24 15:32 ` Keith Owens
2005-01-24 17:51 ` David Mosberger
2005-01-24 17:53 ` David Mosberger
2005-01-25 7:30 ` Christian Hildner
2005-01-25 19:44 ` Chen, Kenneth W
2005-01-25 19:51 ` David Mosberger
2005-01-25 19:57 ` Chen, Kenneth W
2005-01-25 20:01 ` David Mosberger
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=41F4A8F5.3020207@hob.de \
--to=christian.hildner@hob.de \
--cc=linux-ia64@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox