From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
Subject: Unexpected issues with 2 NVME initiators using the same target
Date: Mon, 10 Jul 2017 15:14:06 -0600 [thread overview]
Message-ID: <20170710211406.GA20889@obsidianresearch.com> (raw)
In-Reply-To: <C04891DF-5B3B-4156-9E04-9E18B238864A@oracle.com>
On Mon, Jul 10, 2017@04:51:20PM -0400, Chuck Lever wrote:
>
> > On Jul 10, 2017,@4:05 PM, Jason Gunthorpe <jgunthorpe@obsidianresearch.com> wrote:
> >
> > On Mon, Jul 10, 2017@03:03:18PM -0400, Chuck Lever wrote:
> >
> >> One option is to somehow split the Send-related data structures from
> >> rpcrdma_req, and manage them independently. I've already done that for
> >> MRs: MR state is now located in rpcrdma_mw.
> >
> > Yes, this is is what I was implying.. Track the SQE related stuff
> > seperately in memory allocated during SQ setup - MR, dma maps, etc.
>
> > No need for an atomic/lock then, right? The required memory is bounded
> > since the inline send depth is bounded.
>
> Perhaps I lack some imagination, but I don't see how I can manage
> these small objects without a serialized free list or circular
> array that would be accessed in the forward path and also in a
> Send completion handler.
I don't get it, dma unmap can only ever happen in the send completion
handler, it can never happen in the forward path. (this is the whole
point of this thread)
Since you are not using send completion today you can just use the
wr_id to point to the pre-allocated memory containing the pages to
invalidate. Completely remove dma unmap from the forward path.
Usually I work things out so that the meta-data array is a ring and
every SQE post consumes a meta-data entry. Then occasionally I signal
completion and provide a wr_id of the latest ring index and the
completion handler runs through all the accumulated meta-data and acts
on it (eg unmaps/etc). This approach still allows batching
completions.
Since ring entries are bounded size we just preallocate the largest
size at QP creation. In this case it is some multiple of the number of
inline send pages * number of SQE entries.
> This seems like a lot of overhead to deal with a very uncommon
> case. I can reduce this overhead by signaling only Sends that
> need to unmap page cache pages, but still.
Yes, but it is not avoidable..
> As we previously discussed, xprtrdma does SQ accounting using RPC
> completion as the gate. Basically xprtrdma will send another RPC
> as soon as a previous one is terminated. If the Send WR is still
> running when the RPC terminates, I can potentially overrun the
> Send Queue.
Makes sense. The SQ accounting must be precise.
Jason
next prev parent reply other threads:[~2017-07-10 21:14 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 19:38 Unexpected issues with 2 NVME initiators using the same target shahar.salzman
2017-02-21 22:50 ` Sagi Grimberg
2017-02-22 16:52 ` Laurence Oberman
2017-02-22 19:39 ` Sagi Grimberg
2017-02-26 8:03 ` shahar.salzman
2017-02-26 17:58 ` Gruher, Joseph R
2017-02-27 20:33 ` Sagi Grimberg
2017-02-27 20:57 ` Gruher, Joseph R
2017-03-05 18:23 ` Leon Romanovsky
2017-03-06 0:07 ` Max Gurtovoy
2017-03-06 11:28 ` Sagi Grimberg
2017-03-07 9:27 ` Max Gurtovoy
2017-03-07 13:41 ` Sagi Grimberg
2017-03-09 12:18 ` shahar.salzman
2017-03-12 12:33 ` Vladimir Neyelov
2017-03-13 9:43 ` Sagi Grimberg
2017-03-14 8:55 ` Max Gurtovoy
2017-03-14 19:57 ` Gruher, Joseph R
2017-03-14 23:42 ` Gruher, Joseph R
2017-03-16 0:03 ` Gruher, Joseph R
2017-03-17 18:37 ` Gruher, Joseph R
2017-03-17 19:49 ` Max Gurtovoy
[not found] ` <DE927C68B458BE418D582EC97927A928550391C2@ORSMSX113.amr.corp.intel.com>
2017-03-24 18:30 ` Gruher, Joseph R
2017-03-27 14:17 ` Max Gurtovoy
2017-03-27 15:39 ` Gruher, Joseph R
2017-03-28 8:38 ` Max Gurtovoy
2017-03-28 10:21 ` shahar.salzman
2017-03-28 11:34 ` Sagi Grimberg
2017-04-10 11:40 ` Marta Rybczynska
2017-04-10 14:09 ` Max Gurtovoy
2017-04-11 12:47 ` Marta Rybczynska
2017-04-20 10:18 ` Sagi Grimberg
2017-04-26 11:56 ` Max Gurtovoy
2017-04-26 14:45 ` Sagi Grimberg
2017-05-12 19:20 ` Gruher, Joseph R
2017-05-15 12:00 ` Sagi Grimberg
2017-05-15 13:31 ` Leon Romanovsky
2017-05-15 13:43 ` Sagi Grimberg
2017-05-15 14:36 ` Leon Romanovsky
2017-05-15 14:59 ` Christoph Hellwig
2017-05-15 17:05 ` Leon Romanovsky
2017-05-17 12:56 ` Marta Rybczynska
2017-05-18 13:34 ` Leon Romanovsky
2017-06-19 17:21 ` Robert LeBlanc
2017-06-20 6:39 ` Sagi Grimberg
2017-06-20 7:46 ` Leon Romanovsky
2017-06-20 7:58 ` Sagi Grimberg
2017-06-20 8:33 ` Leon Romanovsky
2017-06-20 9:33 ` Sagi Grimberg
2017-06-20 10:31 ` Max Gurtovoy
2017-06-20 22:58 ` Robert LeBlanc
2017-06-27 7:16 ` Sagi Grimberg
2017-06-20 12:02 ` Sagi Grimberg
2017-06-20 13:28 ` Max Gurtovoy
2017-06-20 17:01 ` Chuck Lever
2017-06-20 17:12 ` Sagi Grimberg
2017-06-20 17:35 ` Jason Gunthorpe
2017-06-20 18:17 ` Chuck Lever
2017-06-20 19:27 ` Jason Gunthorpe
2017-06-20 20:56 ` Chuck Lever
2017-06-20 21:19 ` Jason Gunthorpe
2017-06-27 7:37 ` Sagi Grimberg
2017-06-27 14:42 ` Chuck Lever
2017-06-27 16:07 ` Sagi Grimberg
2017-06-27 16:28 ` Jason Gunthorpe
2017-06-28 7:03 ` Sagi Grimberg
2017-06-27 16:28 ` Chuck Lever
2017-06-28 7:08 ` Sagi Grimberg
2017-06-28 16:11 ` Chuck Lever
2017-06-29 5:35 ` Sagi Grimberg
2017-06-29 14:55 ` Chuck Lever
2017-07-02 9:45 ` Sagi Grimberg
2017-07-02 18:17 ` Chuck Lever
2017-07-09 16:47 ` Jason Gunthorpe
2017-07-10 19:03 ` Chuck Lever
2017-07-10 20:05 ` Jason Gunthorpe
2017-07-10 20:51 ` Chuck Lever
2017-07-10 21:14 ` Jason Gunthorpe [this message]
2017-07-10 21:24 ` Jason Gunthorpe
2017-07-10 21:29 ` Chuck Lever
2017-07-10 21:32 ` Jason Gunthorpe
2017-07-10 22:04 ` Chuck Lever
2017-07-10 22:09 ` Jason Gunthorpe
2017-07-11 3:57 ` Chuck Lever
2017-07-11 13:23 ` Tom Talpey
2017-07-11 14:55 ` Chuck Lever
2017-06-27 18:08 ` Bart Van Assche
2017-06-27 18:14 ` Jason Gunthorpe
2017-06-28 7:16 ` Sagi Grimberg
2017-06-28 9:43 ` Bart Van Assche
2017-06-20 17:08 ` Robert LeBlanc
2017-06-20 17:19 ` Sagi Grimberg
2017-06-20 17:28 ` Robert LeBlanc
2017-06-27 7:22 ` Sagi Grimberg
2017-06-20 14:43 ` Robert LeBlanc
2017-06-20 14:41 ` Robert LeBlanc
2017-02-27 20:13 ` Sagi Grimberg
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=20170710211406.GA20889@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).