History

rds: deliver zerocopy completion notification with data

This commit is an optimization over commit 01883eda72bd ("rds: support for zcopy completion notification") for PF_RDS sockets. RDS applications are predominantly request-response transactions, so it is more efficient to reduce the number of system calls and have zerocopy completion notification delivered as ancillary data on the POLLIN channel. Cookies are passed up as ancillary data (at level SOL_RDS) in a struct rds_zcopy_cookies when the returned value of recvmsg() is greater than, or equal to, 0. A max of RDS_MAX_ZCOOKIES may be passed with each message. This commit removes support for zerocopy completion notification on MSG_ERRQUEUE for PF_RDS sockets.

Sowmini Varadhan committed 8 years ago

Commit 401910d1 parent 67490e36 files · +60 −27Browse files

Showing the changes to include/uapi/linux (2 of 6 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/errqueue.h +0 −2
  2. include/uapi/linux/rds.h +7 −0
include/uapi/linux/errqueue.h+0−2
@@ -20,13 +20,11 @@ struct sock_extended_err { · 19 unmodified lines
20#define SO_EE_ORIGIN_ICMP6 320#define SO_EE_ORIGIN_ICMP6 3
21#define SO_EE_ORIGIN_TXSTATUS 421#define SO_EE_ORIGIN_TXSTATUS 4
22#define SO_EE_ORIGIN_ZEROCOPY 522#define SO_EE_ORIGIN_ZEROCOPY 5
23#define SO_EE_ORIGIN_ZCOOKIE 6
24#define SO_EE_ORIGIN_TIMESTAMPING SO_EE_ORIGIN_TXSTATUS23#define SO_EE_ORIGIN_TIMESTAMPING SO_EE_ORIGIN_TXSTATUS
25 24
26#define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1))25#define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1))
27 26
28#define SO_EE_CODE_ZEROCOPY_COPIED 127#define SO_EE_CODE_ZEROCOPY_COPIED 1
29#define SO_EE_ORIGIN_MAX_ZCOOKIES 8
30 28
31/**29/**
32 * struct scm_timestamping - timestamps exposed through cmsg30 * struct scm_timestamping - timestamps exposed through cmsg
include/uapi/linux/rds.h+7−0
@@ -104,6 +104,7 @@ · 103 unmodified lines
104#define RDS_CMSG_MASKED_ATOMIC_CSWP 9104#define RDS_CMSG_MASKED_ATOMIC_CSWP 9
105#define RDS_CMSG_RXPATH_LATENCY 11105#define RDS_CMSG_RXPATH_LATENCY 11
106#define RDS_CMSG_ZCOPY_COOKIE 12106#define RDS_CMSG_ZCOPY_COOKIE 12
107#define RDS_CMSG_ZCOPY_COMPLETION 13
107 108
108#define RDS_INFO_FIRST 10000109#define RDS_INFO_FIRST 10000
109#define RDS_INFO_COUNTERS 10000110#define RDS_INFO_COUNTERS 10000
@@ -317,6 +318,12 @@ struct rds_rdma_notify { · 207 unmodified lines
317#define RDS_RDMA_DROPPED 3318#define RDS_RDMA_DROPPED 3
318#define RDS_RDMA_OTHER_ERROR 4319#define RDS_RDMA_OTHER_ERROR 4
319 320
321#define RDS_MAX_ZCOOKIES 8
322struct rds_zcopy_cookies {
323 __u32 num;
324 __u32 cookies[RDS_MAX_ZCOOKIES];
325};
326
320/*327/*
321 * Common set of flags for all RDMA related structs328 * Common set of flags for all RDMA related structs
322 */329 */