From: Keith Owens <kaos@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: optimize __gp location
Date: Sat, 22 Jan 2005 01:02:26 +0000 [thread overview]
Message-ID: <10878.1106355746@ocs3.ocs.com.au> (raw)
In-Reply-To: <B05667366EE6204181EABE9C1B1C0EB50589FCE9@scsmsx401.amr.corp.intel.com>
On Fri, 21 Jan 2005 15:22:18 -0800,
"Chen, Kenneth W" <kenneth.w.chen@intel.com> wrote:
>__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.
>
>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.
The best place for __gp is in the exact middle of the range
.data.init_task through the end of .sbss. Unfortunately a large .data
section could result in .got and .sbss being out of range of a median
__gp. Is it possible in the linker script to first try (.sbss.end -
.data.init_task) / 2, then test the result for reachability to .sbss
and adjust __gp if necessary?
next prev parent reply other threads:[~2005-01-22 1:02 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 [this message]
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
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=10878.1106355746@ocs3.ocs.com.au \
--to=kaos@sgi.com \
--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 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.