Re: [PATCH perftest] Avoid configuring the MRs with 1's

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

 



On Sun, Feb 26, 2017 at 02:21:31PM +0200, Ram Amrani wrote:
> Avoid setting the value '1' in the MR. If this happens in a write latency
> test 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 keep waiting
> for the value of the first write forever.
>
> 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..dc768c4 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 + ((char)rand() % 255);
>  	}
>
>  	return 0;

Zohar?

> --
> 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

Attachment: signature.asc
Description: PGP signature


[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