diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2017-10-20 10:48:36 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2017-11-17 13:47:57 -0500 |
commit | 01bb35c89d90abe6fd1c0be001f84bbdfa7fa7d1 (patch) | |
tree | 527e65074e175980f7ec757f189bd77f11f1b694 /net/dns_resolver | |
parent | 0ba6f37012db2f88f881cd818aec6e1886f61abb (diff) | |
download | linux-01bb35c89d90abe6fd1c0be001f84bbdfa7fa7d1.tar.gz linux-01bb35c89d90abe6fd1c0be001f84bbdfa7fa7d1.tar.bz2 linux-01bb35c89d90abe6fd1c0be001f84bbdfa7fa7d1.zip |
xprtrdma: RPC completion should wait for Send completion
When an RPC Call includes a file data payload, that payload can come
from pages in the page cache, or a user buffer (for direct I/O).
If the payload can fit inline, xprtrdma includes it in the Send
using a scatter-gather technique. xprtrdma mustn't allow the RPC
consumer to re-use the memory where that payload resides before the
Send completes. Otherwise, the new contents of that memory would be
exposed by an HCA retransmit of the Send operation.
So, block RPC completion on Send completion, but only in the case
where a separate file data payload is part of the Send. This
prevents the reuse of that memory while it is still part of a Send
operation without an undue cost to other cases.
Waiting is avoided in the common case because typically the Send
will have completed long before the RPC Reply arrives.
These days, an RPC timeout will trigger a disconnect, which tears
down the QP. The disconnect flushes all waiting Sends. This bounds
the amount of time the reply handler has to wait for a Send
completion.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/dns_resolver')
0 files changed, 0 insertions, 0 deletions