[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66aab8b37157d_21c08c2941@willemb.c.googlers.com.notmuch>
Date: Wed, 31 Jul 2024 18:20:35 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: zijianzhang@...edance.com,
netdev@...r.kernel.org
Cc: linux-api@...r.kernel.org,
willemdebruijn.kernel@...il.com,
almasrymina@...gle.com,
edumazet@...gle.com,
davem@...emloft.net,
kuba@...nel.org,
pabeni@...hat.com,
dsahern@...nel.org,
axboe@...nel.dk,
shuah@...nel.org,
linux-kselftest@...r.kernel.org,
cong.wang@...edance.com,
xiaochun.lu@...edance.com,
Zijian Zhang <zijianzhang@...edance.com>
Subject: Re: [PATCH net-next v8 2/3] sock: add MSG_ZEROCOPY notification
mechanism based on msg_control
zijianzhang@ wrote:
> From: Zijian Zhang <zijianzhang@...edance.com>
>
> The MSG_ZEROCOPY flag enables copy avoidance for socket send calls.
> However, zerocopy is not a free lunch. Apart from the management of user
> pages, the combination of poll + recvmsg to receive notifications incurs
> unignorable overhead in the applications. We try to mitigate this overhead
> with a new notification mechanism based on msg_control. Leveraging the
> general framework to copy cmsgs to the user space, we copy zerocopy
> notifications to the user upon returning of sendmsgs.
May want to
- Explicitly state that receiving notifications on sendmsg is
optional and existing recvmsg MSG_ERRQUEUE continues to work
- Include a very brief example of how this interface is used.
Probably pseudo-code, as msghdr setup and CMSG processing are
verbose operations
Btw patchwork shows red for patch 1/3 due to a new error or warning.
Not sure if it's a false positive, but take a look.
> Signed-off-by: Zijian Zhang <zijianzhang@...edance.com>
> Signed-off-by: Xiaochun Lu <xiaochun.lu@...edance.com>
> +/*
> + * zc_info is the struct used for the SCM_ZC_NOTIFICATION control message.
> + */
> +struct zc_info {
> + __u32 size; /* size of the zc_info_elem arr */
Size is ambiguous, could mean byte size. Perhaps length, or number of
elements in arr[].
> + struct zc_info_elem arr[];
> +};
Powered by blists - more mailing lists