From: Ingo Molnar <mingo@elte.hu>
To: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: linux-kernel@vger.kernel.org, h.mitake@gmail.com,
Ma Ling <ling.ma@intel.com>, Zhao Yakui <yakui.zhao@intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Paul Mackerras <paulus@samba.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] perf bench: add --prefault option for causing page faults before benchmark
Date: Wed, 10 Nov 2010 10:29:45 +0100 [thread overview]
Message-ID: <20101110092945.GD12238@elte.hu> (raw)
In-Reply-To: <1288976785-15857-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
* Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp> wrote:
> This patch adds --prefault option to perf bench mem memcpy.
> If user specify this option to perf bench mem memcpy, overhead of
> page faults will be removed from the score of memcpy().
>
> Example of usage:
> | % ./perf bench mem memcpy -l 500MB
> | # Running mem/memcpy benchmark...
> | # Copying 500MB Bytes from 0x7fc036749010 to 0x7fc055b4a010 ...
> |
> | 628.526821 MB/Sec
> | mitake@X201i:~/linux/.../tools/perf% ./perf bench mem memcpy -l 500MB --prefault
> | # Running mem/memcpy benchmark...
> | # Copying 500MB Bytes from 0x7ff1b45e2010 to 0x7ff1d39e3010 ...
> |
> | 4.849256 GB/Sec
Ok, looks rather useful.
We are rather close to being able to apply these bits. We need a resolution for the
arch/x86/lib/memcpy_64.S details. The ugliest are these kinds of #ifdefs:
+#ifndef PERF_BENCH
.Lmemcpy_e:
.previous
+#endif
What happens if we keep that label in place?
This:
+#ifndef PERF_BENCH
ENTRY(__memcpy)
ENTRY(memcpy)
CFI_STARTPROC
+#else
+ .globl memcpy_x86_64_unrolled
+memcpy_x86_64_unrolled:
+#endif
Could be removed if you defined an ENTRY() macro in perf, right?
This:
+#ifndef PERF_BENCH
+
CFI_ENDPROC
ENDPROC(memcpy)
ENDPROC(__memcpy)
Could be solved by defining ENDPROC()/etc. macros in perf, right?
We could remove this #ifdef:
+#ifndef PERF_BENCH
+
#include <linux/linkage.h>
#include <asm/cpufeature.h>
#include <asm/dwarf2.h>
+#endif /* PERF_BENCH */
if you added empty linkage.h, cpufeature.h and dwarf2.h files as
tools/perf/util/include/linux/linkage.h, tools/perf/util/include/asm/cpufeature.h.
That linkage.h file could even contain a short perf version of the ENTRY() macro,
etc.
That way we can avoid having to touch arch/x86/lib/memcpy_64.S altogether.
Thanks,
Ingo
next prev parent reply other threads:[~2010-11-10 9:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 17:06 [PATCH] perf bench: add --prefault option for causing page faults before benchmark Hitoshi Mitake
2010-11-10 9:29 ` Ingo Molnar [this message]
2010-11-15 15:58 ` Hitoshi Mitake
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=20101110092945.GD12238@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=h.mitake@gmail.com \
--cc=hpa@zytor.com \
--cc=ling.ma@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mitake@dcl.info.waseda.ac.jp \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=yakui.zhao@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).