From: Hans Westgaard Ry <hans.westgaard.ry-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Gil Rockah
<gilr-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Subject: Re: Ping: [PATCH 1/1] Fix deadlock when running run_iter_bw_infinitely
Date: Wed, 9 Dec 2015 10:11:55 +0100 [thread overview]
Message-ID: <5667F05B.8010200@oracle.com> (raw)
In-Reply-To: <20151209085245.GA8662-2ukJVAZIZ/Y@public.gmane.org>
Sorry but I didn't see that "something" gobbled part of the mail.
The correct lines are (as in the original):
src/perftest_resources.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/perftest_resources.c b/src/perftest_resources.c
index cb915e0..4d8e6c0 100755
--- a/src/perftest_resources.c
+++ b/src/perftest_resources.c
@@ -25,6 +25,12 @@ static enum ibv_wr_opcode opcode_atomic_array[] = {IBV_WR_ATOMIC_CMP_AND_SWP,IBV
struct perftest_parameters* duration_param;
struct check_alive_data check_alive_data;
+/*
+ * Flag to trig call to print_report_bw
+ * The flag is set in signal_handler and tested/reset in run_iter_bw_infinitely
+ */
+static volatile int trig_print_report_bw = 0;
+
/******************************************************************************
* Beginning
@@ -3214,7 +3220,15 @@ int run_iter_bw_infinitely(struct pingpong_context *ctx,struct perftest_paramete
/* main loop for posting */
while (1) {
-
+ if (trig_print_report_bw) {
+ duration_param->tcompleted[0] = get_cycles();
+ print_report_bw(duration_param,NULL);
+ duration_param->iters = 0;
+ alarm(duration_param->duration);
+ duration_param->tposted[0] = get_cycles();
+ trig_print_report_bw = 0;
+ }
+
/* main loop to run over all the qps and post each time n messages */
for (index =0 ; index < num_of_qps ; index++) {
@@ -4213,11 +4227,7 @@ void check_alive(int sig)
******************************************************************************/
void catch_alarm_infintely(int sig)
{
- duration_param->tcompleted[0] = get_cycles();
- print_report_bw(duration_param,NULL);
- duration_param->iters = 0;
- alarm(duration_param->duration);
- duration_param->tposted[0] = get_cycles();
+ trig_print_report_bw = 1;
}
On 12/09/2015 09:52 AM, Leon Romanovsky wrote:
> On Wed, Dec 09, 2015 at 09:33:11AM +0100, Hans Westgaard Ry wrote:
>> Any comments on this patch ?
>>
>>
>>
>> On 11/18/2015 01:27 PM, Hans Westgaard Ry wrote:
>>> The test uses a signal-handler to periodically print a line of report.
>>> + if (trig_print_report_bw) {
>>> + duration_param->tcompleted[0] =et_cycles();
>>> + print_report_bw(duration_param,NULL);
>>> + duration_param->iters =;
> Excuse me, what did you mean by the line above?
>
>>> + alarm(duration_param->duration);
>>> + duration_param->tposted[0] =et_cycles();
>>> + trig_print_report_bw =;
> And this line too.
>
--
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
next prev parent reply other threads:[~2015-12-09 9:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 12:27 [PATCH 1/1] Fix deadlock when running run_iter_bw_infinitely Hans Westgaard Ry
[not found] ` <1447849673-30034-1-git-send-email-hans.westgaard.ry-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-12-09 8:33 ` Ping: " Hans Westgaard Ry
[not found] ` <5667E747.2070006-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-12-09 8:52 ` Leon Romanovsky
[not found] ` <20151209085245.GA8662-2ukJVAZIZ/Y@public.gmane.org>
2015-12-09 9:11 ` Hans Westgaard Ry [this message]
[not found] ` <5667F05B.8010200-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-12-09 9:30 ` Leon Romanovsky
[not found] ` <20151209093023.GB8662-2ukJVAZIZ/Y@public.gmane.org>
2016-01-08 7:36 ` Hans Westgaard Ry
[not found] ` <568F66F8.9080407-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-01-21 14:12 ` Leon Romanovsky
2016-01-21 13:58 ` Hans Westgaard Ry
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=5667F05B.8010200@oracle.com \
--to=hans.westgaard.ry-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=gilr-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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;
as well as URLs for NNTP newsgroup(s).