From: Lee Schermerhorn <lee.schermerhorn@hp.com>
To: Cliff Wickman <cpi@sgi.com>
Cc: Kornilios Kourtis <kkourt@cslab.ece.ntua.gr>,
Brice Goglin <Brice.Goglin@inria.fr>,
linux-numa@vger.kernel.org, eric.whitney@hp.com
Subject: [PATCH 6/8] numactl/numademo - eliminate page allocation overhead from memtest measurements
Date: Tue, 28 Apr 2009 12:36:56 -0400 [thread overview]
Message-ID: <20090428163656.24945.34156.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20090428163621.24945.95516.sendpatchset@localhost.localdomain>
PATCH 6/08 numactl - Eliminate page allocation from memtest() measurements
Against: numactl-2.0.3-rc2
The first loop [of LOOPS] in memtest() actually incurs the
page allocation overhead. This results in an artificially
low minimum bandwidth, making the reported bandwidth appear to
be more variable than it really is.
Make an extra, un-measured pass through test buffer in
memtest() to allocate memory. Don't report throughput
for page allocation phase. If page allocation overhead
is of interest, a separate test could be added. Or, we
could make this behavior [measure allocation loop],
optional.
numademo.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletion(-)
Index: numactl-2.0.3-rc2/numademo.c
===================================================================
--- numactl-2.0.3-rc2.orig/numademo.c 2009-01-30 10:10:15.000000000 -0500
+++ numactl-2.0.3-rc2/numademo.c 2009-02-13 10:05:42.000000000 -0500
@@ -165,7 +165,11 @@ void memtest(char *name, unsigned char *
max = 0;
min = ~0UL;
sum = 0;
- for (i = 0; i < LOOPS; i++) {
+
+ /*
+ * Note: 0th pass allocates the pages, don't measure
+ */
+ for (i = 0; i < LOOPS+1; i++) {
clearcache(mem, msize);
switch (thistest) {
case PTRCHASE:
@@ -240,6 +244,9 @@ void memtest(char *name, unsigned char *
break;
}
+ if (!i)
+ continue; /* don't count allocation pass */
+
timersub(&end, &start, &res);
r = timerfold(&res);
if (r > max) max = r;
next prev parent reply other threads:[~2009-04-28 16:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-28 16:36 [PATCH 0/8] numactl/libnuma - Fixes and Cleanup Lee Schermerhorn
2009-04-28 16:36 ` [PATCH 1/8] numactl/libnuma - Possibly already fixed leaks and cleanup Lee Schermerhorn
2009-04-28 16:36 ` [PATCH 2/8] numactl/libnuma - Simple bitmask leak fixes Lee Schermerhorn
2009-04-28 16:36 ` [PATCH 3/8] numactl/libnuma - more " Lee Schermerhorn
2009-04-28 16:36 ` [PATCH 4/8] numactl/libnuma - return freeable bitmasks Lee Schermerhorn
2009-04-28 16:36 ` [PATCH 5/8] numactl/libnuma - fix parsing of cpu, node mask Lee Schermerhorn
2009-04-28 16:36 ` Lee Schermerhorn [this message]
2009-04-28 16:37 ` [PATCH 7/8] numactl/Makefile - Generalize Makefile .so Version Lee Schermerhorn
2009-04-28 16:46 ` Andi Kleen
2009-04-28 17:01 ` Lee Schermerhorn
2009-04-28 17:10 ` Andi Kleen
2009-04-28 16:37 ` [PATCH 8/8] numactl/test - Make checkaffinity more robust Lee Schermerhorn
2009-04-28 19:38 ` [PATCH 0/8] numactl/libnuma - Fixes and Cleanup Cliff Wickman
2009-04-28 20:08 ` Lee Schermerhorn
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=20090428163656.24945.34156.sendpatchset@localhost.localdomain \
--to=lee.schermerhorn@hp.com \
--cc=Brice.Goglin@inria.fr \
--cc=cpi@sgi.com \
--cc=eric.whitney@hp.com \
--cc=kkourt@cslab.ece.ntua.gr \
--cc=linux-numa@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;
as well as URLs for NNTP newsgroup(s).