From: Hitoshi Mitake <mitake.hitoshi@gmail.com>
To: Jianguo Wu <wujianguo@huawei.com>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>,
linux-mm@kvack.org, Andrea Arcangeli <aarcange@redhat.com>,
qiuxishi <qiuxishi@huawei.com>,
Wanpeng Li <liwanp@linux.vnet.ibm.com>,
Hush Bensen <hush.bensen@gmail.com>,
mitake.hitoshi@gmail.com
Subject: Re: Transparent Hugepage impact on memcpy
Date: Fri, 07 Jun 2013 22:50:09 +0900 [thread overview]
Message-ID: <87txlado8e.wl%mitake.hitoshi@gmail.com> (raw)
In-Reply-To: <51B136E2.4010606@huawei.com>
At Fri, 7 Jun 2013 09:26:58 +0800,
Jianguo Wu wrote:
>
> Hi Hitoshi,
>
> Thanks for your reply! please see below.
>
> On 2013/6/6 21:54, Hitoshi Mitake wrote:
>
> > Hi Jianguo,
> >
> > On Wed, Jun 5, 2013 at 12:26 PM, Jianguo Wu <wujianguo@huawei.com> wrote:
> >> Hi,
> >> One more question, I wrote a memcpy test program, mostly the same as with perf bench memcpy.
> >> But test result isn't consistent with perf bench when THP is off.
> >>
> >> my program perf bench
> >> THP: 3.628368 GB/Sec (with prefault) 3.672879 GB/Sec (with prefault)
> >> NO-THP: 3.612743 GB/Sec (with prefault) 6.190187 GB/Sec (with prefault)
> >>
> >> Below is my code:
> >> src = calloc(1, len);
> >> dst = calloc(1, len);
> >>
> >> if (prefault)
> >> memcpy(dst, src, len);
> >> gettimeofday(&tv_start, NULL);
> >> memcpy(dst, src, len);
> >> gettimeofday(&tv_end, NULL);
> >>
> >> timersub(&tv_end, &tv_start, &tv_diff);
> >> free(src);
> >> free(dst);
> >>
> >> speed = (double)((double)len / timeval2double(&tv_diff));
> >> print_bps(speed);
> >>
> >> This is weird, is it possible that perf bench do some build optimize?
> >>
> >> Thansk,
> >> Jianguo Wu.
> >
> > perf bench mem memcpy is build with -O6. This is the compile command
> > line (you can get this with make V=1):
> > gcc -o bench/mem-memcpy-x86-64-asm.o -c -fno-omit-frame-pointer -ggdb3
> > -funwind-tables -Wall -Wextra -std=gnu99 -Werror -O6 .... # ommited
> >
> > Can I see your compile option for your test program and the actual
> > command line executing perf bench mem memcpy?
> >
>
> I just compiled my test program with gcc -o memcpy-test memcpy-test.c.
> I tried to use the same compile option with perf bench mem memcpy, and
> the test result showed no difference.
>
> My execute command line for perf bench mem memcpy:
> #./perf bench mem memcpy -l 1gb -o
Thanks for your information. I have three more requests for
reproducing the problem:
1. the entire source code of your program
2. your gcc version
3. your glibc version
I should've requested it first, sorry :(
Thanks,
Hitoshi
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-06-07 13:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 8:57 Transparent Hugepage impact on memcpy Jianguo Wu
2013-06-04 12:30 ` Wanpeng Li
2013-06-04 20:20 ` Andrea Arcangeli
2013-06-05 2:49 ` Jianguo Wu
2013-06-04 12:30 ` Wanpeng Li
[not found] ` <51adde12.e6b2320a.610d.ffff96f3SMTPIN_ADDED_BROKEN@mx.google.com>
2013-06-04 12:55 ` Jianguo Wu
2013-06-04 14:10 ` Hush Bensen
2013-06-05 3:26 ` Jianguo Wu
2013-06-06 13:54 ` Hitoshi Mitake
2013-06-07 1:26 ` Jianguo Wu
2013-06-07 13:50 ` Hitoshi Mitake [this message]
2013-06-08 1:13 ` Jianguo Wu
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=87txlado8e.wl%mitake.hitoshi@gmail.com \
--to=mitake.hitoshi@gmail.com \
--cc=aarcange@redhat.com \
--cc=hush.bensen@gmail.com \
--cc=linux-mm@kvack.org \
--cc=liwanp@linux.vnet.ibm.com \
--cc=mitake@dcl.info.waseda.ac.jp \
--cc=qiuxishi@huawei.com \
--cc=wujianguo@huawei.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.