From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: zoharb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Cc: gilr-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH perftest] Avoid configuring the MRs with 1's
Date: Tue, 28 Feb 2017 22:00:40 +0200 [thread overview]
Message-ID: <20170228200040.GD2754@mtr-leonro.local> (raw)
In-Reply-To: <1488111691-23620-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1579 bytes --]
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-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> ---
> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-02-28 20:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-26 12:21 [PATCH perftest] Avoid configuring the MRs with 1's Ram Amrani
[not found] ` <1488111691-23620-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-02-28 20:00 ` Leon Romanovsky [this message]
[not found] ` <20170228200040.GD2754-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-03-01 9:03 ` Zohar Ben Aharon
[not found] ` <HE1PR05MB11618D7789611C3526FBB791B5540@HE1PR05MB1161.eurprd05.prod.outlook.com>
[not found] ` <AM5PR0501MB2532CD619D600768E58EB1EEA92D0@AM5PR0501MB2532.eurprd05.prod.outlook.com>
[not found] ` <AM5PR0501MB2532CD619D600768E58EB1EEA92D0-Z3o2H//EDN6VqDs954T/B8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-03-05 15:14 ` Amrani, Ram
2017-03-05 15:16 ` Amrani, Ram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170228200040.GD2754@mtr-leonro.local \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=gilr-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=zoharb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox