public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Or Gerlitz <ogerlitz-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
Cc: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
	Steve Wise
	<swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>,
	"Robert D. Russell" <rdr-zcUZCMB5SQOVc3sceRu5cw@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] libibverbs/doc: clarify selective signaling (Re: using IBV_SEND_SIGNALED)
Date: Wed, 1 Dec 2010 12:10:46 -0700	[thread overview]
Message-ID: <20101201191046.GR16788@obsidianresearch.com> (raw)
In-Reply-To: <4CF60ED0.6000502-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>

On Wed, Dec 01, 2010 at 11:01:04AM +0200, Or Gerlitz wrote:
> Jason Gunthorpe wrote:
> > Applications which use selective signaling can only assume that
> > unsignaled WRs are complete once a completion for a later signaled WR
> > is received. In practice this means that a signaled WR must be
> > used periodically, and that the send queue should never be filled with unsignaled WRs.
> 
> clarify selective signaling usage
> 
> Signed-off-by: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>
 
> Jason, how's this?

Sure, but reviewing the original thread makes me think there is a
greater mis-understanding at work about how resource ownership works
in verbs than simply related to the unsignaled WRs.

Maybe this would be a better approach:

RESOURCE OWNERSHIP
 ibv_post_* transfers ownership of the described buffer(s) 
 to the device. While the device is processing the WR the buffer(s)
 should not be changed and a queue entry is
 consumed to hold this WR while it is being processed.

 Callers are required to track how many entries in the queue are
 owned by the device and how many are free for new WRs.
 Attempting to post more WRs that there are free queue entries results
 in E???.

 Ownership of the buffer and queue entry is only passed back to the
 caller once a completion on the associated CQ is retrieved.
 A completion indicates all prior WR are completed, including
 unsignaled WRs.

 Note that receiving a completion for the WR through a CQ is the only
 way to know that the queue entry and WR is passed back to the
 caller. Other implicit means, such as receiving a recv completion,
 observing data change in memory, or the like do not reliably indicate
 that the device is finished with the queue entry and WR.

 When using unsignaled WRs it is necessary to periodically use
 a signaled WR and collect completions so that the available free
 space in the queue can be tracked.

Also, I like your sentence about errors for unsignaled WCs, that
should be kept in the IBV_SEND_SIGNALED section..

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

      parent reply	other threads:[~2010-12-01 19:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LNX.2.00.1011291128190.31687@postal.iol.unh.edu>
     [not found] ` <4CF3DDF0.2070907@opengridcomputing.com>
     [not found]   ` <alpine.LNX.2.00.1011291233540.5810@postal.iol.unh.edu>
     [not found]     ` <4CF3E5FA.6010308@opengridcomputing.com>
     [not found]       ` <4CF3E5FA.6010308-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-11-30 11:56         ` [PATCH] libibverbs/doc: clarify selective signaling (Re: using IBV_SEND_SIGNALED) Or Gerlitz
     [not found]           ` <4CF4E65D.4070205-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-11-30 18:57             ` Jason Gunthorpe
     [not found]               ` <20101130185744.GK16788-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-12-01  8:17                 ` Or Gerlitz
2010-12-01  9:01                 ` Or Gerlitz
     [not found]                   ` <4CF60ED0.6000502-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-12-01 19:10                     ` Jason Gunthorpe [this message]

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=20101201191046.GR16788@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org \
    --cc=rdr-zcUZCMB5SQOVc3sceRu5cw@public.gmane.org \
    --cc=rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@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