public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add 64-byte alignment tests to memcpy/memmove/memset benchtests
@ 2016-03-31 16:34 H.J. Lu
  2016-03-31 16:34 ` [PATCH 1/3] Test 64-byte alignment in memcpy benchtest H.J. Lu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: H.J. Lu @ 2016-03-31 16:34 UTC (permalink / raw)
  To: libc-alpha

This set of patches to add 64-byte alignment tests to memcpy, memmove
and memset benchtest to check performance with 64-byte vector registers.

H.J. Lu (3):
  Test 64-byte alignment in memcpy benchtest
  Test 64-byte alignment in memmove benchtest
  Test 64-byte alignment in memset benchtest

 benchtests/bench-memcpy.c  | 8 ++++++++
 benchtests/bench-memmove.c | 8 ++++++++
 benchtests/bench-memset.c  | 7 ++++++-
 3 files changed, 22 insertions(+), 1 deletion(-)

-- 
2.5.5

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/3] Test 64-byte alignment in memset benchtest
  2016-03-31 16:34 [PATCH 0/3] Add 64-byte alignment tests to memcpy/memmove/memset benchtests H.J. Lu
  2016-03-31 16:34 ` [PATCH 1/3] Test 64-byte alignment in memcpy benchtest H.J. Lu
  2016-03-31 16:34 ` [PATCH 2/3] Test 64-byte alignment in memmove benchtest H.J. Lu
@ 2016-03-31 16:34 ` H.J. Lu
  2016-04-01  5:49   ` Siddhesh Poyarekar
  2 siblings, 1 reply; 7+ messages in thread
From: H.J. Lu @ 2016-03-31 16:34 UTC (permalink / raw)
  To: libc-alpha

Add 64-byte alignment tests in memset benchtest for 64-byte vector
registers.

OK for master?

H.J.
--
	* benchtests/bench-memset.c (do_test): Support 64-byte
	alignment.
	(test_main): Test 64-byte alignment.
---
 benchtests/bench-memset.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/benchtests/bench-memset.c b/benchtests/bench-memset.c
index 6d3218a..98ec257 100644
--- a/benchtests/bench-memset.c
+++ b/benchtests/bench-memset.c
@@ -134,7 +134,7 @@ do_one_test (impl_t *impl, CHAR *s, int c __attribute ((unused)), size_t n)
 static void
 do_test (size_t align, int c, size_t len)
 {
-  align &= 7;
+  align &= 63;
   if ((align + len) * sizeof (CHAR) > page_size)
     return;
 
@@ -181,6 +181,11 @@ test_main (void)
       do_test (4, c, 64);
       do_test (2, c, 25);
     }
+  for (i = 33; i <= 256; i += 4)
+    {
+      do_test (0, c, 32 * i);
+      do_test (i, c, 32 * i);
+    }
 
   return ret;
 }
-- 
2.5.5

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/3] Test 64-byte alignment in memmove benchtest
  2016-03-31 16:34 [PATCH 0/3] Add 64-byte alignment tests to memcpy/memmove/memset benchtests H.J. Lu
  2016-03-31 16:34 ` [PATCH 1/3] Test 64-byte alignment in memcpy benchtest H.J. Lu
@ 2016-03-31 16:34 ` H.J. Lu
  2016-04-01  5:49   ` Siddhesh Poyarekar
  2016-03-31 16:34 ` [PATCH 3/3] Test 64-byte alignment in memset benchtest H.J. Lu
  2 siblings, 1 reply; 7+ messages in thread
From: H.J. Lu @ 2016-03-31 16:34 UTC (permalink / raw)
  To: libc-alpha

Add 64-byte alignment tests in memmove benchtest for 64-byte vector
registers.

OK for master?

H.J.
--
	* benchtests/bench-memmove.c (test_main): Test 64-byte
	alignment.
---
 benchtests/bench-memmove.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/benchtests/bench-memmove.c b/benchtests/bench-memmove.c
index 79b7bd8..c38596b 100644
--- a/benchtests/bench-memmove.c
+++ b/benchtests/bench-memmove.c
@@ -176,6 +176,14 @@ test_main (void)
       do_test (i, 0, 16 * i);
     }
 
+  for (i = 32; i < 64; ++i)
+    {
+      do_test (0, 0, 32 * i);
+      do_test (i, 0, 32 * i);
+      do_test (0, i, 32 * i);
+      do_test (i, i, 32 * i);
+    }
+
   return ret;
 }
 
-- 
2.5.5

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] Test 64-byte alignment in memcpy benchtest
  2016-03-31 16:34 [PATCH 0/3] Add 64-byte alignment tests to memcpy/memmove/memset benchtests H.J. Lu
@ 2016-03-31 16:34 ` H.J. Lu
  2016-04-01  5:48   ` Siddhesh Poyarekar
  2016-03-31 16:34 ` [PATCH 2/3] Test 64-byte alignment in memmove benchtest H.J. Lu
  2016-03-31 16:34 ` [PATCH 3/3] Test 64-byte alignment in memset benchtest H.J. Lu
  2 siblings, 1 reply; 7+ messages in thread
From: H.J. Lu @ 2016-03-31 16:34 UTC (permalink / raw)
  To: libc-alpha

Add 64-byte alignment tests in memcpy benchtest for 64-byte vector
registers.

OK for master?

H.J.
--
	* benchtests/bench-memcpy.c (test_main): Test 64-byte alignment.
---
 benchtests/bench-memcpy.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/benchtests/bench-memcpy.c b/benchtests/bench-memcpy.c
index d942ce2..c5a7192 100644
--- a/benchtests/bench-memcpy.c
+++ b/benchtests/bench-memcpy.c
@@ -149,6 +149,14 @@ test_main (void)
       do_test (i, i, 16 * i);
     }
 
+  for (i = 32; i < 64; ++i)
+    {
+      do_test (0, 0, 32 * i);
+      do_test (i, 0, 32 * i);
+      do_test (0, i, 32 * i);
+      do_test (i, i, 32 * i);
+    }
+
   do_test (0, 0, getpagesize ());
 
   return ret;
-- 
2.5.5

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] Test 64-byte alignment in memcpy benchtest
  2016-03-31 16:34 ` [PATCH 1/3] Test 64-byte alignment in memcpy benchtest H.J. Lu
@ 2016-04-01  5:48   ` Siddhesh Poyarekar
  0 siblings, 0 replies; 7+ messages in thread
From: Siddhesh Poyarekar @ 2016-04-01  5:48 UTC (permalink / raw)
  To: H.J. Lu; +Cc: libc-alpha

On Thu, Mar 31, 2016 at 09:34:33AM -0700, H.J. Lu wrote:
> Add 64-byte alignment tests in memcpy benchtest for 64-byte vector
> registers.
> 
> OK for master?
> 
> H.J.
> --
> 	* benchtests/bench-memcpy.c (test_main): Test 64-byte alignment.
> ---
>  benchtests/bench-memcpy.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/benchtests/bench-memcpy.c b/benchtests/bench-memcpy.c
> index d942ce2..c5a7192 100644
> --- a/benchtests/bench-memcpy.c
> +++ b/benchtests/bench-memcpy.c
> @@ -149,6 +149,14 @@ test_main (void)
>        do_test (i, i, 16 * i);
>      }
>  
> +  for (i = 32; i < 64; ++i)
> +    {
> +      do_test (0, 0, 32 * i);
> +      do_test (i, 0, 32 * i);
> +      do_test (0, i, 32 * i);
> +      do_test (i, i, 32 * i);
> +    }
> +
>    do_test (0, 0, getpagesize ());
>  
>    return ret;
> -- 
> 2.5.5
> 

OK.

Siddhesh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] Test 64-byte alignment in memset benchtest
  2016-03-31 16:34 ` [PATCH 3/3] Test 64-byte alignment in memset benchtest H.J. Lu
@ 2016-04-01  5:49   ` Siddhesh Poyarekar
  0 siblings, 0 replies; 7+ messages in thread
From: Siddhesh Poyarekar @ 2016-04-01  5:49 UTC (permalink / raw)
  To: H.J. Lu; +Cc: libc-alpha

On Thu, Mar 31, 2016 at 09:34:35AM -0700, H.J. Lu wrote:
> Add 64-byte alignment tests in memset benchtest for 64-byte vector
> registers.
> 
> OK for master?
> 
> H.J.
> --
> 	* benchtests/bench-memset.c (do_test): Support 64-byte
> 	alignment.
> 	(test_main): Test 64-byte alignment.
> ---
>  benchtests/bench-memset.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/benchtests/bench-memset.c b/benchtests/bench-memset.c
> index 6d3218a..98ec257 100644
> --- a/benchtests/bench-memset.c
> +++ b/benchtests/bench-memset.c
> @@ -134,7 +134,7 @@ do_one_test (impl_t *impl, CHAR *s, int c __attribute ((unused)), size_t n)
>  static void
>  do_test (size_t align, int c, size_t len)
>  {
> -  align &= 7;
> +  align &= 63;
>    if ((align + len) * sizeof (CHAR) > page_size)
>      return;
>  
> @@ -181,6 +181,11 @@ test_main (void)
>        do_test (4, c, 64);
>        do_test (2, c, 25);
>      }
> +  for (i = 33; i <= 256; i += 4)
> +    {
> +      do_test (0, c, 32 * i);
> +      do_test (i, c, 32 * i);
> +    }
>  
>    return ret;
>  }
> -- 
> 2.5.5
> 

OK.

Siddhesh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] Test 64-byte alignment in memmove benchtest
  2016-03-31 16:34 ` [PATCH 2/3] Test 64-byte alignment in memmove benchtest H.J. Lu
@ 2016-04-01  5:49   ` Siddhesh Poyarekar
  0 siblings, 0 replies; 7+ messages in thread
From: Siddhesh Poyarekar @ 2016-04-01  5:49 UTC (permalink / raw)
  To: H.J. Lu; +Cc: libc-alpha

On Thu, Mar 31, 2016 at 09:34:34AM -0700, H.J. Lu wrote:
> Add 64-byte alignment tests in memmove benchtest for 64-byte vector
> registers.
> 
> OK for master?
> 
> H.J.
> --
> 	* benchtests/bench-memmove.c (test_main): Test 64-byte
> 	alignment.
> ---
>  benchtests/bench-memmove.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/benchtests/bench-memmove.c b/benchtests/bench-memmove.c
> index 79b7bd8..c38596b 100644
> --- a/benchtests/bench-memmove.c
> +++ b/benchtests/bench-memmove.c
> @@ -176,6 +176,14 @@ test_main (void)
>        do_test (i, 0, 16 * i);
>      }
>  
> +  for (i = 32; i < 64; ++i)
> +    {
> +      do_test (0, 0, 32 * i);
> +      do_test (i, 0, 32 * i);
> +      do_test (0, i, 32 * i);
> +      do_test (i, i, 32 * i);
> +    }
> +
>    return ret;
>  }
>  

OK.

Siddhesh

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-01  5:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-31 16:34 [PATCH 0/3] Add 64-byte alignment tests to memcpy/memmove/memset benchtests H.J. Lu
2016-03-31 16:34 ` [PATCH 1/3] Test 64-byte alignment in memcpy benchtest H.J. Lu
2016-04-01  5:48   ` Siddhesh Poyarekar
2016-03-31 16:34 ` [PATCH 2/3] Test 64-byte alignment in memmove benchtest H.J. Lu
2016-04-01  5:49   ` Siddhesh Poyarekar
2016-03-31 16:34 ` [PATCH 3/3] Test 64-byte alignment in memset benchtest H.J. Lu
2016-04-01  5:49   ` Siddhesh Poyarekar

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 read-only IMAP folder(s) and NNTP newsgroup(s).