public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tom Talpey <tom@talpey.com>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	Caitlin Bestler <cait@asomi.com>
Cc: Bart Van Assche <bart.vanassche@sandisk.com>,
	Christoph Hellwig <hch@lst.de>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"sagig@dev.mellanox.co.il" <sagig@dev.mellanox.co.il>,
	"axboe@fb.com" <axboe@fb.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/9] IB: add a proper completion queue abstraction
Date: Tue, 24 Nov 2015 07:52:40 -0500	[thread overview]
Message-ID: <56545D98.1020904@talpey.com> (raw)
In-Reply-To: <20151124070301.GA23597@obsidianresearch.com>

On 11/24/2015 2:03 AM, Jason Gunthorpe wrote:
> On Mon, Nov 23, 2015 at 06:35:28PM -0800, Caitlin Bestler wrote:
>> Are there actual HCAs that make this mistake?
>
> All IB HCAs have this behavior and require apps to see a send CQ
> completion before making any statements about the state of the send Q
> or buffers handed over to the HCA. Tom and I have seen this in real
> systems under proper stress conditions. [Which is why I am so certain
> about this, because when I first hit it years ago I dug into the spec
> and figured out it was not a HW bug I was looking at]

To be clear, I saw the reply-completion-before-request-completion on
Windows, not Linux, but the principle is identical. It's simply a
fact of life on a multiprocessor, unless you want to throw in locks
and synchronization rules that drivers have to follow to enforce
ordered completions across queues. Which trust me, you don't.

In Windows SMB Direct, we added reference counts around pretty much
every verb interaction associated with each upper layer operation,
and did not retire them until all refcounts went to zero. It is
excruciatingly correct yet performs incredibly well.

Tom.

  reply	other threads:[~2015-11-24 12:59 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13 13:46 add a proper completion queue abstraction Christoph Hellwig
2015-11-13 13:46 ` [PATCH 1/9] move blk_iopoll to limit and make it generally available Christoph Hellwig
2015-11-13 15:23   ` Or Gerlitz
2015-11-14  7:02     ` Christoph Hellwig
2015-11-15  8:48       ` Sagi Grimberg
2015-11-15  9:04         ` Or Gerlitz
2015-11-15 13:16           ` Sagi Grimberg
2015-11-15 12:51         ` Christoph Hellwig
2015-11-13 19:19   ` Bart Van Assche
2015-11-14  7:02     ` Christoph Hellwig
2015-11-17 17:16       ` Bart Van Assche
2015-11-17 17:27         ` Bart Van Assche
2015-11-18 13:58         ` Christoph Hellwig
2015-11-13 13:46 ` [PATCH 2/9] IB: add a proper completion queue abstraction Christoph Hellwig
2015-11-13 18:25   ` Jason Gunthorpe
2015-11-13 19:57     ` Bart Van Assche
2015-11-13 22:06       ` Jason Gunthorpe
2015-11-14  7:13         ` Christoph Hellwig
2015-11-23 20:37           ` Jason Gunthorpe
2015-11-23 21:04             ` Bart Van Assche
2015-11-23 21:28               ` Jason Gunthorpe
2015-11-23 21:54                 ` Bart Van Assche
2015-11-23 22:18                   ` Jason Gunthorpe
2015-11-23 22:33                     ` Bart Van Assche
2015-11-23 23:06                       ` Jason Gunthorpe
     [not found]                         ` <B24F4DDE-709A-4D2D-8B26-4E83325DBB1A@asomi.com>
2015-11-24  0:00                           ` Jason Gunthorpe
2015-11-24  0:34                             ` Tom Talpey
2015-11-24  0:40                               ` Jason Gunthorpe
2015-11-24  2:35                             ` Caitlin Bestler
2015-11-24  7:03                               ` Jason Gunthorpe
2015-11-24 12:52                                 ` Tom Talpey [this message]
2015-11-14  7:08     ` Christoph Hellwig
2015-11-23 20:01       ` Jason Gunthorpe
2015-11-23 20:57         ` Christoph Hellwig
2015-11-15  9:40   ` Sagi Grimberg
2015-11-15 12:55     ` Christoph Hellwig
2015-11-15 13:21       ` Sagi Grimberg
2015-11-17 17:52   ` Bart Van Assche
2015-11-18  7:55     ` Sagi Grimberg
2015-11-18 18:20       ` Bart Van Assche
2015-11-20 10:16         ` Christoph Hellwig
2015-11-20 16:50           ` Bart Van Assche
2015-11-22  9:51             ` Sagi Grimberg
2015-11-22 10:13               ` Christoph Hellwig
2015-11-22 10:36                 ` Sagi Grimberg
2015-11-22 13:23                   ` Christoph Hellwig
2015-11-22 14:57                     ` Sagi Grimberg
2015-11-22 16:55                       ` Bart Van Assche
2015-11-18 14:00     ` Christoph Hellwig
2015-11-13 13:46 ` [PATCH 3/9] IB: add a helper to safely drain a QP Christoph Hellwig
2015-11-13 16:16   ` Steve Wise
2015-11-14  7:05     ` Christoph Hellwig
2015-11-15  9:34   ` Sagi Grimberg
2015-11-16 16:38     ` Steve Wise
2015-11-16 18:30       ` Steve Wise
2015-11-16 18:37         ` Sagi Grimberg
2015-11-16 19:03           ` Steve Wise
2015-11-17  8:54             ` Sagi Grimberg
2015-11-23 10:28             ` Sagi Grimberg
2015-11-23 10:35               ` Sagi Grimberg
2015-11-23 14:33                 ` 'Christoph Hellwig'
2015-11-23 14:48                 ` Steve Wise
2015-11-23 14:44               ` Steve Wise
2015-11-17 17:06     ` Bart Van Assche
2015-11-18  7:59       ` Sagi Grimberg
2015-11-18 11:32   ` Sagi Grimberg
2015-11-18 14:06     ` Christoph Hellwig
2015-11-18 15:21       ` Steve Wise
2015-11-13 13:46 ` [PATCH 4/9] srpt: chain RDMA READ/WRITE requests Christoph Hellwig
2015-11-18  1:17   ` Bart Van Assche
2015-11-18  9:15     ` Sagi Grimberg
2015-11-18 16:32       ` Bart Van Assche
2015-11-20 10:20         ` Christoph Hellwig
2015-11-18 14:06     ` Christoph Hellwig
2015-11-13 13:46 ` [PATCH 5/9] srpt: use the new CQ API Christoph Hellwig
2015-11-17 18:22   ` Bart Van Assche
2015-11-17 19:38   ` Bart Van Assche
2015-11-18 14:03     ` Christoph Hellwig
2015-11-13 13:46 ` [PATCH 6/9] srp: " Christoph Hellwig
2015-11-17 19:56   ` Bart Van Assche
2015-11-18 14:03     ` Christoph Hellwig
2015-11-13 13:46 ` [PATCH 7/9] IB/iser: Use a dedicated descriptor for login Christoph Hellwig
2015-11-15  9:14   ` Or Gerlitz
2015-11-13 13:46 ` [PATCH 8/9] IB/iser: Use helper for container_of Christoph Hellwig
2015-11-13 13:46 ` [PATCH 9/9] IB/iser: Convert to CQ abstraction Christoph Hellwig
2015-11-15  9:21   ` Or Gerlitz
     [not found] <20151124100839.48b52fb35c6f209c51bccbb9807b6df0.f113bf890f.wbe@email24.secureserver.net>
2015-11-24 17:52 ` [PATCH 2/9] IB: add a proper completion queue abstraction Jason Gunthorpe
     [not found]   ` <56552132.7090701@asomi.com>
2015-11-25  6:21     ` Jason Gunthorpe

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=56545D98.1020904@talpey.com \
    --to=tom@talpey.com \
    --cc=axboe@fb.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=cait@asomi.com \
    --cc=hch@lst.de \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sagig@dev.mellanox.co.il \
    /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