From: Andi Kleen <andi@firstfloor.org>
To: William Cohen <wcohen@redhat.com>
Cc: "linux-perf-users@vger.kernel.org" <linux-perf-users@vger.kernel.org>
Subject: Re: Perf supporting function reordering?
Date: Mon, 17 Mar 2014 09:35:20 -0700 [thread overview]
Message-ID: <87wqfsdbqv.fsf@tassilo.jf.intel.com> (raw)
In-Reply-To: <5327215C.7010005@redhat.com> (William Cohen's message of "Mon, 17 Mar 2014 12:22:52 -0400")
William Cohen <wcohen@redhat.com> writes:
> Has there been any thought about perf supporting function reordering?
See autofdo http://gcc.gnu.org/wiki/AutoFDO and
http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01440.html
It's not in any standard compiler unfortunately.
Standard gcc can do it with profile feedback, but not for the standard kernel.
> Any thoughts on making it easier for perf make this statistical
> callgraph information available and using it to do code reordering? I
> have experimented with code reorder with user space postgres package
> and it did help performance about 5% improvement in IPC
Is the mechanism of the IPC improvement understood?
My understanding from older tools that did this the main advantage of
pure reordering (not full profile feedback, which has many advantages)
is mainly in startup time improvements and lowering the TLB overhead
slightly, apart from slightly smaller working.
However this all does not apply to the kernel, which does not do demand
paging. In general modern CPUs are pretty good at prefetching code.
For the TLB issues the better strategy is likely just going for
large pages, as Kirill's MM work enables.
-Andi
--
ak@linux.intel.com -- Speaking for myself only
next prev parent reply other threads:[~2014-03-17 16:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 16:22 Perf supporting function reordering? William Cohen
2014-03-17 16:35 ` Andi Kleen [this message]
2014-03-17 18:36 ` William Cohen
2014-03-17 23:39 ` Andi Kleen
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=87wqfsdbqv.fsf@tassilo.jf.intel.com \
--to=andi@firstfloor.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=wcohen@redhat.com \
/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.