1. 02 8月, 2018 38 次提交
  2. 01 8月, 2018 2 次提交
    • D
      rxrpc: Transmit more ACKs during data reception · d0b35a42
      David Howells 提交于
      Immediately flush any outstanding ACK on entry to rxrpc_recvmsg_data() -
      which transfers data to the target buffers - if we previously had an Rx
      underrun (ie. we returned -EAGAIN because we ran out of received data).
      This lets the server know what we've managed to receive something.
      
      Also flush any outstanding ACK after calling the function if it hit -EAGAIN
      to let the server know we processed some data.
      
      It might be better to send more ACKs, possibly on a time-based scheme, but
      that needs some more consideration.
      
      With this and some additional AFS patches, it is possible to get large
      unencrypted O_DIRECT reads to be almost as fast as NFS over TCP.  It looks
      like it might be theoretically possible to improve performance yet more for
      a server running a single operation as investigation of packet timestamps
      indicates that the server keeps stalling.
      
      The issue appears to be that rxrpc runs in to trouble with ACK packets
      getting batched together (up to ~32 at a time) somewhere between the IP
      transmit queue on the client and the ethernet receive queue on the server.
      
      However, this case isn't too much of a worry as even a lightly loaded
      server should be receiving sufficient packet flux to flush the ACK packets
      to the UDP socket.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      d0b35a42
    • D
      rxrpc: Propose, but don't immediately transmit, the final ACK for a call · a71a2651
      David Howells 提交于
      The final ACK that closes out an rxrpc call needs to be transmitted by the
      client unless we're going to follow up with a DATA packet for a new call on
      the same channel (which implicitly ACK's the previous call, thereby saving
      an ACK).
      
      Currently, we don't do that, so if no follow on call is immediately
      forthcoming, the server will resend the last DATA packet - at which point
      rxrpc_conn_retransmit_call() will be triggered and will (re)send the final
      ACK.  But the server has to hold on to the last packet until the ACK is
      received, thereby holding up its resources.
      
      Fix the client side to propose a delayed final ACK, to be transmitted after
      a short delay, assuming the call isn't superseded by a new one.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      a71a2651