This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.26.9000-796-geb332f9


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  eb332f9feb7637eeefed037a683d2a6130d058b1 (commit)
       via  4d7632ff687dc60fb9ed38bae682d395017b61a8 (commit)
      from  a465b89ee82642c193cfd7deb6eb5d999ffaa5b7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb332f9feb7637eeefed037a683d2a6130d058b1

commit eb332f9feb7637eeefed037a683d2a6130d058b1
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date:   Mon Nov 20 17:56:35 2017 +0530

    benchtests: Bump start size since smaller sizes are noisy
    
    Numbers for very small sizes (< 128B) are much noisier for non-cached
    benchmarks like the walk benchmarks, so don't include them.
    
    	* benchtests/bench-memcpy-walk.c (START_SIZE): Set to 128.
    	* benchtests/bench-memmove-walk.c (START_SIZE): Likewise.
    	* benchtests/bench-memset-walk.c (START_SIZE): Likewise.

diff --git a/ChangeLog b/ChangeLog
index 746222d..4c2c5bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2017-11-20  Siddhesh Poyarekar  <siddhesh@sourceware.org>
 
+	* benchtests/bench-memcpy-walk.c (START_SIZE): Set to 128.
+	* benchtests/bench-memmove-walk.c (START_SIZE): Likewise.
+	* benchtests/bench-memset-walk.c (START_SIZE): Likewise.
+
 	* benchtests/bench-memcpy-walk.c (do_one_test): Copy only
 	backwards.  Fix timing computation.
 	* benchtests/bench-memmove-walk.c (do_one_test): Likewise.
diff --git a/benchtests/bench-memcpy-walk.c b/benchtests/bench-memcpy-walk.c
index 5b56341..ef90a92 100644
--- a/benchtests/bench-memcpy-walk.c
+++ b/benchtests/bench-memcpy-walk.c
@@ -29,7 +29,7 @@
 
 #ifndef MEMCPY_RESULT
 # define MEMCPY_RESULT(dst, len) dst
-# define START_SIZE 1
+# define START_SIZE 128
 # define MIN_PAGE_SIZE (getpagesize () + 32 * 1024 * 1024)
 # define TEST_MAIN
 # define TEST_NAME "memcpy"
diff --git a/benchtests/bench-memmove-walk.c b/benchtests/bench-memmove-walk.c
index 969ddd9..189ce64 100644
--- a/benchtests/bench-memmove-walk.c
+++ b/benchtests/bench-memmove-walk.c
@@ -29,7 +29,7 @@
 
 #ifndef MEMMOVE_RESULT
 # define MEMMOVE_RESULT(dst, len) dst
-# define START_SIZE 1
+# define START_SIZE 128
 # define MIN_PAGE_SIZE (getpagesize () + 32 * 1024 * 1024)
 # define TEST_MAIN
 # define TEST_NAME "memmove"
diff --git a/benchtests/bench-memset-walk.c b/benchtests/bench-memset-walk.c
index 80fbe09..213bb60 100644
--- a/benchtests/bench-memset-walk.c
+++ b/benchtests/bench-memset-walk.c
@@ -22,7 +22,7 @@
 #else
 # define TEST_NAME "wmemset"
 #endif /* WIDE */
-#define START_SIZE (1)
+#define START_SIZE 128
 #define MIN_PAGE_SIZE (getpagesize () + 32 * 1024 * 1024)
 #define TIMEOUT (20 * 60)
 #include "bench-string.h"

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4d7632ff687dc60fb9ed38bae682d395017b61a8

commit 4d7632ff687dc60fb9ed38bae682d395017b61a8
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date:   Mon Nov 20 17:55:59 2017 +0530

    benchtests: Fix walking sizes and directions for *-walk benchmarks
    
    Make the walking benchmarks walk only backwards since copying both
    ways is biased in favour of implementations that use non-temporal
    stores for larger sizes; falkor is one of them.  This also fixes up
    bugs in computation of the result which ended up multiplying the
    length with the timing result unnecessarily.
    
    	* benchtests/bench-memcpy-walk.c (do_one_test): Copy only
    	backwards.  Fix timing computation.
    	* benchtests/bench-memmove-walk.c (do_one_test): Likewise.
    	* benchtests/bench-memset-walk.c (do_one_test): Walk backwards
    	on memset by N at a time.  Fix timing computation.

diff --git a/ChangeLog b/ChangeLog
index 225596d..746222d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-11-20  Siddhesh Poyarekar  <siddhesh@sourceware.org>
+
+	* benchtests/bench-memcpy-walk.c (do_one_test): Copy only
+	backwards.  Fix timing computation.
+	* benchtests/bench-memmove-walk.c (do_one_test): Likewise.
+	* benchtests/bench-memset-walk.c (do_one_test): Walk backwards
+	on memset by N at a time.  Fix timing computation.
+
 2017-11-20  Florian Weimer  <fweimer@redhat.com>
 
 	* manual/llio.texi (Memory-mapped I/O): Document MAP_HUGETLB,
diff --git a/benchtests/bench-memcpy-walk.c b/benchtests/bench-memcpy-walk.c
index 69d467d..5b56341 100644
--- a/benchtests/bench-memcpy-walk.c
+++ b/benchtests/bench-memcpy-walk.c
@@ -47,26 +47,22 @@ static void
 do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src,
 	     size_t len)
 {
-  size_t i, iters = MIN_PAGE_SIZE / len;
+  size_t i = 0;
   timing_t start, stop, cur;
 
   char *dst_end = dst + MIN_PAGE_SIZE - len;
   char *src_end = src + MIN_PAGE_SIZE - len;
 
   TIMING_NOW (start);
-  /* Copy the entire buffer back and forth, LEN at a time.  */
-  for (i = 0; i < iters && dst_end >= dst && src <= src_end; src++, dst_end--)
-    {
-      CALL (impl, dst_end, src, len);
-      CALL (impl, src, dst_end, len);
-      i += 2;
-    }
+  /* Copy the entire buffer backwards, LEN at a time.  */
+  for (; src_end >= src && dst_end >= dst; src_end -= len, dst_end -= len, i++)
+    CALL (impl, src_end, dst_end, len);
   TIMING_NOW (stop);
 
   TIMING_DIFF (cur, start, stop);
 
   /* Get time taken per function call.  */
-  json_element_double (json_ctx, (double) cur * len / i);
+  json_element_double (json_ctx, (double) cur / i);
 }
 
 static void
diff --git a/benchtests/bench-memmove-walk.c b/benchtests/bench-memmove-walk.c
index 54dcd64..969ddd9 100644
--- a/benchtests/bench-memmove-walk.c
+++ b/benchtests/bench-memmove-walk.c
@@ -47,26 +47,22 @@ static void
 do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src,
 	     size_t len)
 {
-  size_t i, iters = MIN_PAGE_SIZE / len;
+  size_t i = 0;
   timing_t start, stop, cur;
 
   char *dst_end = dst + MIN_PAGE_SIZE - len;
   char *src_end = src + MIN_PAGE_SIZE - len;
 
   TIMING_NOW (start);
-  /* Copy the entire buffer back and forth, LEN at a time.  */
-  for (i = 0; i < iters && dst_end >= dst && src <= src_end; src++, dst_end--)
-    {
-      CALL (impl, dst_end, src, len);
-      CALL (impl, src, dst_end, len);
-      i += 2;
-    }
+  /* Copy the entire buffer backwards, LEN at a time.  */
+  for (; src_end >= src && dst <= dst_end; dst += len, src_end -= len, i++)
+    CALL (impl, dst, src_end, len);
   TIMING_NOW (stop);
 
   TIMING_DIFF (cur, start, stop);
 
   /* Get time taken per function call.  */
-  json_element_double (json_ctx, (double) cur * len / i);
+  json_element_double (json_ctx, (double) cur / i);
 }
 
 static void
@@ -79,7 +75,6 @@ do_test (json_ctx_t *json_ctx, size_t len, bool overlap)
   if (overlap)
     buf2 = buf1;
 
-  /* First the non-overlapping moves.  */
   FOR_EACH_IMPL (impl, 0)
     do_one_test (json_ctx, impl, (char *) buf2, (char *) buf1, len);
 
diff --git a/benchtests/bench-memset-walk.c b/benchtests/bench-memset-walk.c
index 59d2626..80fbe09 100644
--- a/benchtests/bench-memset-walk.c
+++ b/benchtests/bench-memset-walk.c
@@ -66,14 +66,14 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s, CHAR *s_end,
   timing_t start, stop, cur;
 
   TIMING_NOW (start);
-  for (i = 0; i < iters && s <= s_end; s++, i++)
+  for (i = 0; i < iters && s <= s_end; s_end -= n, i++)
     CALL (impl, s, c, n);
   TIMING_NOW (stop);
 
   TIMING_DIFF (cur, start, stop);
 
   /* Get time taken per function call.  */
-  json_element_double (json_ctx, (double) cur * n / i);
+  json_element_double (json_ctx, (double) cur / i);
 }
 
 static void

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                       |   12 ++++++++++++
 benchtests/bench-memcpy-walk.c  |   16 ++++++----------
 benchtests/bench-memmove-walk.c |   17 ++++++-----------
 benchtests/bench-memset-walk.c  |    6 +++---
 4 files changed, 27 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]