• Chuck Lever's avatar
    svcrdma: support multiple Read chunks per RPC · d7cc7397
    Chuck Lever authored
    An efficient way to handle multiple Read chunks is to post them all
    together and then take a single completion. This is also how the
    code is already structured: when the Read completion fires, all
    portions of the incoming RPC message are available to be assembled.
    
    The difficult problem is setting up the Read sink buffers so that
    the server pulls the client's data into place, making subsequent
    pull-up unnecessary. There are several cases:
    
    * No Read chunks. No-op.
    
    * One data item Read chunk. This is the fast case, where the inline
      part of the RPC-over-RDMA message becomes the head and tail, and
      the data item chunk is placed in buf->pages.
    
    * A Position-zero Read chunk. Treated like TCP: the Read chunk is
      pulled into contiguous pages.
    
    + A Position-zero Read chunk with data item chunks. Treated like
      TCP: all of the Read chunks are pulled into contiguous pages.
    
    + Multiple data item chunks. Treated like TCP: the inline part is
      copied and the data item chunks are pulled into contiguous pages.
    
    The "*" cases are already supported. This patch adds support for the
    "+" cases.
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    d7cc7397
svc_rdma_rw.c 31.8 KB