From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: zijianzhang@bytedance.com, netdev@vger.kernel.org
Cc: linux-api@vger.kernel.org, willemdebruijn.kernel@gmail.com,
almasrymina@google.com, edumazet@google.com,
davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
dsahern@kernel.org, axboe@kernel.dk, shuah@kernel.org,
linux-kselftest@vger.kernel.org, cong.wang@bytedance.com,
xiaochun.lu@bytedance.com,
Zijian Zhang <zijianzhang@bytedance.com>
Subject: Re: [PATCH net-next v8 2/3] sock: add MSG_ZEROCOPY notification mechanism based on msg_control
Date: Wed, 31 Jul 2024 18:20:35 -0400 [thread overview]
Message-ID: <66aab8b37157d_21c08c2941@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20240730184120.4089835-3-zijianzhang@bytedance.com>
zijianzhang@ wrote:
> From: Zijian Zhang <zijianzhang@bytedance.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@bytedance.com>
> Signed-off-by: Xiaochun Lu <xiaochun.lu@bytedance.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[];
> +};
next prev parent reply other threads:[~2024-07-31 22:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 18:41 [PATCH net-next v8 0/3] net: A lightweight zero-copy notification mechanism for MSG_ZEROCOPY zijianzhang
2024-07-30 18:41 ` [PATCH net-next v8 1/3] sock: support copying cmsgs to the user space in sendmsg zijianzhang
2024-07-30 18:41 ` [PATCH net-next v8 2/3] sock: add MSG_ZEROCOPY notification mechanism based on msg_control zijianzhang
2024-07-31 22:20 ` Willem de Bruijn [this message]
2024-08-01 1:29 ` Jakub Kicinski
2024-08-01 17:52 ` Willem de Bruijn
2024-07-30 18:41 ` [PATCH net-next v8 3/3] selftests: add MSG_ZEROCOPY msg_control notification test zijianzhang
2024-07-31 22:32 ` Willem de Bruijn
2024-08-01 17:30 ` Zijian Zhang
2024-08-01 17:36 ` Willem de Bruijn
2024-08-01 18:15 ` Zijian Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=66aab8b37157d_21c08c2941@willemb.c.googlers.com.notmuch \
--to=willemdebruijn.kernel@gmail.com \
--cc=almasrymina@google.com \
--cc=axboe@kernel.dk \
--cc=cong.wang@bytedance.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=xiaochun.lu@bytedance.com \
--cc=zijianzhang@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).