All of lore.kernel.org
 help / color / mirror / Atom feed
From: swise@opengridcomputing.com (Steve Wise)
Subject: [PATCH 0/3] Fix request completion holes
Date: Thu, 2 Nov 2017 11:53:44 -0500	[thread overview]
Message-ID: <026401d353fb$24d56d60$6e804820$@opengridcomputing.com> (raw)
In-Reply-To: <20171102163614.GK18874@ziepe.ca>

> 
> > iWARP spec too.   This is in regard to completion ordering though.  The
local
> > invalidate send WR must have the IB_SEND_FENCE flag set if you want it to
only
> > be executed after all prior send WRs are executed.
> 
> Oh right, yes, you need to have local invalidate fence to guarentee
> that, but usually a local operation will not refer to a RKEY, so
> execution ordering wont matter.
> 
> But this is a good general point, doesn't a ULP need to set FENCE on
> SEND, eg:
> 
>  RDMA READ (rkey)
>  RDMA READ (rkey)
>  SEND w/ FENCE (tell remote to invalidate rkey)
> 
> Otherwise IBA Table 79 says RDMA READ can pass SEND and we have a
> situation where the rkey has become invalidated when the remote is
> still trying to use it.
> 
> IBA actually explicitly calls this out (pg 538):
> 
>  RDMA Read operations may be executed at the target after subse-
>  quent Send and Invalidate operation already performed the invalida-
>  tion at the target. That may cause the RDMA Read operation to fail.
>  Setting the Fence Indicator on the subsequent operations guarantees
>  that the RDMA Read will fully complete before the invalidation takes
>  place.
> 
> None of our ULPs use IB_SEND_FENCE - so this is a bug!
> 

I think the nvmf target doesn't post the SEND_W_INVALIDATE (NVMF CQE) until the
RDMA READ(s) (and back end BIO submission) complete. 

Steve.

WARNING: multiple messages have this Message-ID (diff)
From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: 'Jason Gunthorpe' <jgg-uk2M96/98Pc@public.gmane.org>
Cc: 'Sagi Grimberg' <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>,
	'idanb' <idanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	'Max Gurtovoy' <maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	'Christoph Hellwig' <hch-jcswGhMUV9g@public.gmane.org>,
	chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Subject: RE: [PATCH 0/3] Fix request completion holes
Date: Thu, 2 Nov 2017 11:53:44 -0500	[thread overview]
Message-ID: <026401d353fb$24d56d60$6e804820$@opengridcomputing.com> (raw)
In-Reply-To: <20171102163614.GK18874-uk2M96/98Pc@public.gmane.org>

> 
> > iWARP spec too.   This is in regard to completion ordering though.  The
local
> > invalidate send WR must have the IB_SEND_FENCE flag set if you want it to
only
> > be executed after all prior send WRs are executed.
> 
> Oh right, yes, you need to have local invalidate fence to guarentee
> that, but usually a local operation will not refer to a RKEY, so
> execution ordering wont matter.
> 
> But this is a good general point, doesn't a ULP need to set FENCE on
> SEND, eg:
> 
>  RDMA READ (rkey)
>  RDMA READ (rkey)
>  SEND w/ FENCE (tell remote to invalidate rkey)
> 
> Otherwise IBA Table 79 says RDMA READ can pass SEND and we have a
> situation where the rkey has become invalidated when the remote is
> still trying to use it.
> 
> IBA actually explicitly calls this out (pg 538):
> 
>  RDMA Read operations may be executed at the target after subse-
>  quent Send and Invalidate operation already performed the invalida-
>  tion at the target. That may cause the RDMA Read operation to fail.
>  Setting the Fence Indicator on the subsequent operations guarantees
>  that the RDMA Read will fully complete before the invalidation takes
>  place.
> 
> None of our ULPs use IB_SEND_FENCE - so this is a bug!
> 

I think the nvmf target doesn't post the SEND_W_INVALIDATE (NVMF CQE) until the
RDMA READ(s) (and back end BIO submission) complete. 

Steve.

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

  reply	other threads:[~2017-11-02 16:53 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31  8:55 [PATCH 0/3] Fix request completion holes Sagi Grimberg
2017-10-31  8:55 ` Sagi Grimberg
2017-10-31  8:55 ` [PATCH 1/3] nvme-rdma: don't suppress send completions Sagi Grimberg
2017-10-31  8:55   ` Sagi Grimberg
2017-10-31  8:55 ` [PATCH 2/3] nvme-rdma: don't complete requests before a send work request has completed Sagi Grimberg
2017-10-31  8:55   ` Sagi Grimberg
2017-10-31  8:55 ` [PATCH 3/3] nvme-rdma: wait for local invalidation before completing a request Sagi Grimberg
2017-10-31  8:55   ` Sagi Grimberg
2017-10-31  9:38 ` [PATCH 0/3] Fix request completion holes Max Gurtovoy
2017-10-31  9:38   ` Max Gurtovoy
2017-10-31 11:10   ` Sagi Grimberg
2017-10-31 11:10     ` Sagi Grimberg
2017-11-01 16:02     ` idanb
2017-11-01 16:02       ` idanb
2017-11-01 16:09       ` Max Gurtovoy
2017-11-01 16:09         ` Max Gurtovoy
2017-11-01 16:50       ` Jason Gunthorpe
2017-11-01 16:50         ` Jason Gunthorpe
2017-11-01 17:31         ` Sagi Grimberg
2017-11-01 17:31           ` Sagi Grimberg
2017-11-01 17:58           ` Jason Gunthorpe
2017-11-01 17:58             ` Jason Gunthorpe
2017-11-02  8:06             ` Sagi Grimberg
2017-11-02  8:06               ` Sagi Grimberg
2017-11-02 15:12               ` Jason Gunthorpe
2017-11-02 15:12                 ` Jason Gunthorpe
2017-11-02 15:23                 ` Sagi Grimberg
2017-11-02 15:23                   ` Sagi Grimberg
2017-11-02 15:51                   ` Jason Gunthorpe
2017-11-02 15:51                     ` Jason Gunthorpe
2017-11-02 16:15                     ` Sagi Grimberg
2017-11-02 16:15                       ` Sagi Grimberg
2017-11-02 16:18                 ` Steve Wise
2017-11-02 16:18                   ` Steve Wise
2017-11-02 16:36                   ` Jason Gunthorpe
2017-11-02 16:36                     ` Jason Gunthorpe
2017-11-02 16:53                     ` Steve Wise [this message]
2017-11-02 16:53                       ` Steve Wise
2017-11-02 16:54                       ` Jason Gunthorpe
2017-11-02 16:54                         ` Jason Gunthorpe
2017-11-01 17:26       ` Sagi Grimberg
2017-11-01 17:26         ` Sagi Grimberg
2017-11-01 22:23         ` Max Gurtovoy
2017-11-01 22:23           ` Max Gurtovoy
2017-11-02 17:55         ` Steve Wise
2017-11-02 17:55           ` 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='026401d353fb$24d56d60$6e804820$@opengridcomputing.com' \
    --to=swise@opengridcomputing.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.