public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 31/37] librdmacm: provide abstracted verb calls
Date: Wed, 07 Apr 2010 17:07:21 -0500	[thread overview]
Message-ID: <4BBD0219.2080602@opengridcomputing.com> (raw)
In-Reply-To: <3F9969F0569A431A9B40B8DED7E18FB4-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>

Sean Hefty wrote:
>>> I think it's possible for the function to return without having filled in a
>>>       
>> wc.
>>     
>> So its busted?  Or is this intended behavior?
>>     
>
> Depends on the point of view, I guess.  :)  It would be nice to avoid that
> situation.
>
>   
>> Is rdma_get_send_completion() supposed to return exactly one wc?  If so
>> then the 2 polls can cause a wc to get silently discarded.   I must
>> still not be understanding the intended use?
>>     
>
> How can a wc get discarded?  Maybe the return code from ibv_poll_cq is confusing
> you?  If the first poll finds a wc, ibv_poll_cq returns 1, and we exit the
> function.  Otherwise, we rearm the cq, then poll again to make sure that nothing
> got missed.
>
>   


Right.  I missed that.  poll will return 1 if there's a completion 
returned.  Nevermind :)


>> I would think this should just be:
>>
>> get_cq_event()
>> notify_cq()
>> poll()
>>     
>
> This requires arming the CQ up front.  I was also trying to avoid the overhead
> of always calling get_cq_event and notify_cq to just pull a completed request
> off of the work queue.
>
>   


I was confused on the poll_cq return code (and I've been working in this 
code for umpteen years :) ).


>>> The only drawback I see is that it's theoretically possible to build up a
>>>       
>> queue
>>     
>>> of cq events in the kernel.  Not sure how to fix that.  Any ideas?
>>>
>>>       
>> That can always happen, yes?
>>     
>
> It seems like it should be avoidable.  Maybe 1 event can queue up, but I think
> we can prevent more by not rearming until that event gets pulled.
>
> If nothing else, I think this discussion shows why we need this sort of wrapper.
> :)
>   

Indeed!  I like the wrappers.


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

  parent reply	other threads:[~2010-04-07 22:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-07 17:12 [PATCH 31/37] librdmacm: provide abstracted verb calls Sean Hefty
     [not found] ` <27A4CFF94530491F88C8E528428FF93E-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-04-07 19:39   ` Steve Wise
     [not found]     ` <4BBCDF57.20303-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-04-07 20:14       ` Sean Hefty
     [not found]         ` <411E3A9BECF04B598FFEFFF08505DE6F-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-04-07 20:38           ` Steve Wise
     [not found]             ` <4BBCED37.9040708-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-04-07 22:01               ` Sean Hefty
     [not found]                 ` <3F9969F0569A431A9B40B8DED7E18FB4-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-04-07 22:07                   ` Steve Wise [this message]
2010-04-08  0:41   ` [PATCH 31/37 v2] " Sean Hefty

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=4BBD0219.2080602@opengridcomputing.com \
    --to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@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