From: Sean Hefty <[email protected]>

1 million ping-pong transfers takes over 3 seconds to
complete, and I'm impatient.  Reduce the default number of
transfers for small messsages to speed up running
performance tests, especially when running over slower
connections, like TCP sockets or over a WAN.

Signed-off-by: Sean Hefty <[email protected]>
---
 examples/common.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/examples/common.c b/examples/common.c
index 939f50c..4eb5bbe 100644
--- a/examples/common.c
+++ b/examples/common.c
@@ -117,16 +117,14 @@ void cnt_str(char *str, size_t ssize, long long cnt)
 
 int size_to_count(int size)
 {
-       if (size >= 1000000)
+       if (size >= (1 << 20))
                return 100;
-       else if (size >= 100000)
+       else if (size >= (1 << 16))
                return 1000;
-       else if (size >= 10000)
+       else if (size >= (1 << 10))
                return 10000;
-       else if (size >= 1000)
-               return 100000;
        else
-               return 1000000;
+               return 100000;
 }
 
 void format_buf(void *buf, int size)
-- 
1.7.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to