Skip to content

ksmbd: splice READ payloads over TCP

Huiwen He linux-cifs lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ksmbd: send READ payloads with MSG_SPLICE_PAGESfs/smb/server/connection.c fs/smb/server/connection.h fs/smb/server/ksmbd_work.c +4 more+152 -260 replies
2/2ksmbd: retain unsent READ pages on the TCP send queuefs/smb/server/transport_tcp.c+149 -220 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] ksmbd: splice READ payloads over TCP

From: Huiwen He <[email protected]>

ksmbd reads file data into a private response buffer. TCP then copies the payload into an skb. If the reply must be queued, ksmbd also copies the unsent bytes into a queue buffer.

This series uses MSG_SPLICE_PAGES to avoid those TCP copies for plain, standalone READs: patch 1 splices the initial TCP send from private pages and a header page fragment, and patch 2 retains references to unsent payload folios on the send queue so the send worker can splice them as well.

Summary of fio sequential read results (16 jobs, QD32 per job, SMB3.1.1 tmpfs; each column is relative to the preceding commit):

Channels I/O Throughput change Host Gcycles/GiB change

                     patch 1    patch 2          patch 1    patch 2
       1  4 KiB        -0.3%      -0.9%            +1.8%      -1.1%
       1  64 KiB      +28.4%      +0.9%           -31.5%      -5.9%
       1  256 KiB     +60.8%      +5.3%           -40.5%     -22.5%
       1  1 MiB       +51.5%      +9.2%           -33.1%     -32.2%
       4  4 KiB        +0.2%      +0.2%            +0.9%      +0.2%
       4  64 KiB       +3.9%      +2.6%            -6.9%      +0.8%
       4  256 KiB     +12.1%      -0.4%           -43.0%      -0.8%
       4  1 MiB       +17.6%      +7.1%           -39.5%     -34.7%

Huiwen He (2):
ksmbd: send READ payloads with MSG_SPLICE_PAGES
ksmbd: retain unsent READ pages on the TCP send queue

 fs/smb/server/connection.c    |  18 +++
 fs/smb/server/connection.h    |   1 +
 fs/smb/server/ksmbd_work.c    |  24 ++--
 fs/smb/server/ksmbd_work.h    |   8 +-
 fs/smb/server/smb2pdu.c       |  74 +++++++++--
 fs/smb/server/transport_tcp.c | 223 ++++++++++++++++++++++++++++++----
 fs/smb/server/transport_tcp.h |   1 +
 7 files changed, 301 insertions(+), 48 deletions(-)

base-commit: 89d5e8fdd5a74a318d18b7267c4ec5d70b2285f1

Signature · 1 line
2.43.0