Re: [PATCH v2] perf bench: fix order of arguments to memcpy_alloc_mem
* Bruce Merry wrote: > 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: Bruce Merry > --- > tools/perf/bench/mem-memcpy.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c > index 6c14afe..db1d3a2 100644 > --- a/tools/perf/bench/mem-memcpy.c > +++ b/tools/perf/bench/mem-memcpy.c > @@ -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(, , len); > + memcpy_alloc_mem(, , 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(, , len); > + memcpy_alloc_mem(, , len); > > if (prefault) > fn(dst, src, len); Acked-by: Ingo Molnar Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] perf bench: fix order of arguments to memcpy_alloc_mem
* Bruce Merry bme...@ska.ac.za wrote: 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: Bruce Merry bme...@ska.ac.za --- tools/perf/bench/mem-memcpy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c index 6c14afe..db1d3a2 100644 --- a/tools/perf/bench/mem-memcpy.c +++ b/tools/perf/bench/mem-memcpy.c @@ -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); Acked-by: Ingo Molnar mi...@kernel.org Thanks, Ingo -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2] 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: Bruce Merry --- tools/perf/bench/mem-memcpy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c index 6c14afe..db1d3a2 100644 --- a/tools/perf/bench/mem-memcpy.c +++ b/tools/perf/bench/mem-memcpy.c @@ -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(, , len); + memcpy_alloc_mem(, , 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(, , len); + memcpy_alloc_mem(, , len); if (prefault) fn(dst, src, len); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2] 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: Bruce Merry bme...@ska.ac.za --- tools/perf/bench/mem-memcpy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c index 6c14afe..db1d3a2 100644 --- a/tools/perf/bench/mem-memcpy.c +++ b/tools/perf/bench/mem-memcpy.c @@ -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); -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/