linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	linux-rdma@vger.kernel.org,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH RFC 0/5] xprtrdma Send completion batching
Date: Wed, 6 Sep 2017 10:15:42 -0400	[thread overview]
Message-ID: <890CC58C-7F8F-4B7E-8620-21F07007D3AA@oracle.com> (raw)
In-Reply-To: <1230f9d9-07c1-6d00-b197-f408712fb5c1@grimberg.me>


> On Sep 6, 2017, at 7:54 AM, Sagi Grimberg <sagi@grimberg.me> wrote:
> 
>> Hi Jason, Sagi-
> 
> Hey Chuck,
> 
>> As we discussed a few weeks ago, this patch series implements the
>> following:
>> - Send SGEs are now managed via lock-less, wait-free circular queues
>> - Send SGEs referring to page cache pages are DMA unmapped during
>>   Send completion
>> - Send completions are batched to reduce interrupts, but still
>>   provide a periodic heartbeat signal for SQ housekeeping
>> - The circular queue prevents Send Queue overflow
>> The purpose of this change is to address the issue Sagi reported
>> where the HCA continues to retry a delayed Send request _after_ RPC
>> completion, resulting in a DMA error.
> 
> Question, what happens in direct-io for example? Can a mapped buffer be
> reclaimed/free'd before the send completion arrives?

Good Q! RPC completion allows memory containing the arguments and
results to be re-used. IIRC our conclusion was that a retransmitted
Send could expose the wrong argument data on the wire in this case.

Buffer re-use implies that the RPC has completed. Either a matching
RPC Reply was received, or the RPC was terminated via a POSIX signal.

If the client has already received an RPC Reply for this transaction,
a previous transmission of the RPC Call has already executed on the
server, and this retransmission will be ignored. It's only purpose is
to generate an appropriate RDMA ACK.

A re-used buffer might be subsequently used for data that is sensitive,
and the retransmission will expose that data on the wire. To protect
against that, RPC can use a GSS flavor that protects confidentiality
of RPC arguments and results. This would also require RPC-over-RDMA
to use only RDMA Read to convey RPC Call messages. Send would be used
only to convey the chunk lists, never data.

Note that the buffers used to construct RPC Calls are always mapped
and Send uses the local DMA key to post them. These can also be
re-used immediately after RPC completion. The exposure risk there is
of RPC headers and non-data arguments.


--
Chuck Lever




  reply	other threads:[~2017-09-06 14:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05 17:00 [PATCH RFC 0/5] xprtrdma Send completion batching Chuck Lever
2017-09-05 17:00 ` [PATCH RFC 1/5] xprtrdma: Clean up SGE accounting in rpcrdma_prepare_msg_sges() Chuck Lever
2017-09-05 17:00 ` [PATCH RFC 2/5] xprtrdma: Change return value of rpcrdma_prepare_send_sges() Chuck Lever
2017-09-05 17:00 ` [PATCH RFC 3/5] xprtrdma: Add data structure to manage RDMA Send arguments Chuck Lever
2017-09-05 17:00 ` [PATCH RFC 4/5] xprtrdma: Manage RDMA Send arguments via lock-free circular queue Chuck Lever
2017-09-05 21:50   ` Chuck Lever
2017-09-05 17:00 ` [PATCH RFC 5/5] xprtrdma: Remove atomic send completion counting Chuck Lever
2017-09-05 20:06 ` [PATCH RFC 0/5] xprtrdma Send completion batching Jason Gunthorpe
2017-09-05 21:22   ` Chuck Lever
2017-09-05 22:03     ` Jason Gunthorpe
2017-09-06 14:17       ` Chuck Lever
2017-09-06  1:28     ` Tom Talpey
2017-09-06 11:54 ` Sagi Grimberg
2017-09-06 14:15   ` Chuck Lever [this message]
2017-09-06 14:29     ` Sagi Grimberg
2017-09-06 15:11       ` Chuck Lever
2017-09-06 15:23         ` Sagi Grimberg
2017-09-06 18:33           ` Chuck Lever
2017-09-06 19:39             ` Jason Gunthorpe
2017-09-06 20:02               ` Chuck Lever
2017-09-06 20:09                 ` Jason Gunthorpe
2017-09-06 21:00                   ` Chuck Lever
2017-09-06 21:11                     ` Jason Gunthorpe
2017-09-07 13:17               ` Tom Talpey
2017-09-07 15:08                 ` Jason Gunthorpe
2017-09-07 16:15                   ` Tom Talpey

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=890CC58C-7F8F-4B7E-8620-21F07007D3AA@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sagi@grimberg.me \
    /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).