提交 e17fdaea 编写于 作者: B Bruce Merry 提交者: Arnaldo Carvalho de Melo

perf bench: Fix order of arguments to memcpy_alloc_mem

This was causing the destination instead of the source to be filled.  As
a result, the source was typically all mapped to one zero page, and
hence very cacheable.
Signed-off-by: NBruce Merry <bmerry@ska.ac.za>
Acked-by: NIngo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150115092022.GA11292@krytonSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 2a6730c8
......@@ -289,7 +289,7 @@ static u64 do_memcpy_cycle(const struct routine *r, size_t len, bool prefault)
memcpy_t fn = r->fn.memcpy;
int i;
memcpy_alloc_mem(&src, &dst, len);
memcpy_alloc_mem(&dst, &src, len);
if (prefault)
fn(dst, src, len);
......@@ -312,7 +312,7 @@ static double do_memcpy_gettimeofday(const struct routine *r, size_t len,
void *src = NULL, *dst = NULL;
int i;
memcpy_alloc_mem(&src, &dst, len);
memcpy_alloc_mem(&dst, &src, len);
if (prefault)
fn(dst, src, len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部