RE: [PATCH perftest v2] Bug fix write latency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Ram for the quick response!!!
it will be pushed to main branch within a few days.
Do you familiar with Perftest Git-hub repository ?  
	https://github.com/linux-rdma/perftest
you can use it to push patches as well. 


Thanks , 

Zohar Ben Aharon





-----Original Message-----
From: Ram Amrani [mailto:Ram.Amrani@xxxxxxxxxx] 
Sent: Sunday, March 05, 2017 5:23 PM
To: Zohar Ben Aharon <zoharb@xxxxxxxxxxxx>; Gil Rockah <gilr@xxxxxxxxxxxx>
Cc: linux-rdma@xxxxxxxxxxxxxxx; Ariel.Elior@xxxxxxxxxx; leon@xxxxxxxxxx; Ram Amrani <Ram.Amrani@xxxxxxxxxx>
Subject: [PATCH perftest v2] Bug fix write latency

Avoid setting the value '1' in the MR. If this does happen then the server will send two consecutive packets, regardless of the client's state. This can cause the application to hang. If the client reaches the busy-wait loop after the second write then it'll hang in the loop forever, waiting for the value of the first write.

Signed-off-by: Ram Amrani <Ram.Amrani@xxxxxxxxxx>
---
 src/perftest_resources.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/perftest_resources.c b/src/perftest_resources.c index afae5f2..21ff972 100755
--- a/src/perftest_resources.c
+++ b/src/perftest_resources.c
@@ -1252,7 +1252,11 @@ int create_single_mr(struct pingpong_context *ctx, struct perftest_parameters *u
 	/* Initialize buffer with random numbers */
 	srand(time(NULL));
 	for (i = 0; i < ctx->buff_size; i++) {
-		((char*)ctx->buf[qp_index])[i] = (char)rand();
+		/* prevent the value 1 from being written into the buffer so in,
+		 * e.g., write latency test, the server won't send two packets
+		 * consecutively without receiving a packet from the client first.
+		 */ 
+		((char*)ctx->buf[qp_index])[i] = 2 + ((unsigned char)rand() % 255);
 	}
 
 	return 0;
--
1.8.3.1

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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux