From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Yishai Hadas <yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: "Hefty,
Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>,
"linux-rdma
(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org"
<yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
jay.e.sternberg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
"Tzahi Oved (tzahio-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org)"
<tzahio-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH libibverbs] XRC - Sample application issues
Date: Mon, 19 Aug 2013 13:12:16 -0600 [thread overview]
Message-ID: <20130819191216.GA29493@obsidianresearch.com> (raw)
In-Reply-To: <52108E6C.9070908-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
On Sun, Aug 18, 2013 at 12:05:48PM +0300, Yishai Hadas wrote:
> On 8/16/2013 06:11 PM, Sean Hefty wrote:
> >>@@ -884,6 +884,13 @@ int main(int argc, char *argv[])
> >> if (ctx.use_event)
> >> ibv_ack_cq_events(ctx.recv_cq, num_cq_events);
> >>
> >>+ /* Process should wait before closing its resources to make sure
> >>+ * latest daemon's response sent via its target QP destined to an XSRQ
> >>+ * created by another client won't be lost.
> >>+ * Failure to do so will cause the client to wait for that sent message
> >>forever.
> >>+ * See comment on pp_post_send.
> >>+ */
> >>+ sleep(1);
> >I dislike adding sleep calls into code. Isn't there a more robust way to handle this?
>
> In general I agree this sleep is a workaround that comes to solve a
> synchronization hole in this sample application. For that reason I
> put 5 lines comment to describe the problem and the reason for that
> sleep statement. Long term you could think of synchronizing all the
> processes through the sockets mechanism to assure they terminate
> when all packets are received.
This example is very close to the only code that people will have
access to when trying to work with XRC.
It should be complete and correct under all cases. So no sleeps, IMHO.
Jason
--
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:[~2013-08-19 19:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 15:05 [PATCH libibverbs] XRC - Sample application issues Yishai Hadas
[not found] ` <1375974336-26314-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-08-16 15:10 ` Hefty, Sean
[not found] ` <63247C4015478741AE4981C62DF608835683DDC8@MTLDAG01.mtl.com>
[not found] ` <63247C4015478741AE4981C62DF608835683DDC8-fViJhHBwANKuSA5JZHE7gA@public.gmane.org>
2013-08-18 9:05 ` Yishai Hadas
[not found] ` <52108E6C.9070908-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-08-19 19:12 ` Jason Gunthorpe [this message]
[not found] ` <20130819191216.GA29493-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2013-08-20 5:16 ` Ido Shamai
[not found] ` <1828884A29C6694DAF28B7E6B8A8237388CA64F6-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-08-19 15:27 ` Steve Wise
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=20130819191216.GA29493@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=jay.e.sternberg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=tzahio-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=yishaih-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