On 4/19/24 12:08, Pavel Begunkov wrote:
Please, don't take directly, conflicts with io_uring.
When everyone is happy with the patches, Jens and Jakub will hopefully
help to merge them. E.g. first staging net/ specific changes [1] and then
handling all conflicts on the io_uring side.
[1]
ubuf_info, otherwise we could end up in a situation
when the send would not be able to progress.
Reviewed-by: Jens Axboe
Reviewed-by: David Ahern
Signed-off-by: Pavel Begunkov
---
include/linux/skbuff.h | 2 ++
net/core/skbuff.c | 20 ++--
2 files changed, 16 insert
boe
Signed-off-by: Pavel Begunkov
---
io_uring/notif.c | 71 +++-
io_uring/notif.h | 3 ++
2 files changed, 67 insertions(+), 7 deletions(-)
diff --git a/io_uring/notif.c b/io_uring/notif.c
index 26680176335f..d58cdc01e691 100644
--- a/io_uring/noti
/notif-stacking-v2
First two patches based on net-next:
https://github.com/isilence/linux.git iou-sendzc/notif-stacking-v2-netonly
v2: convert xen-netback to ubuf_info_ops (patch 1)
drop two separately merged io_uring patches
Pavel Begunkov (4):
net: extend ubuf_info callback to ops struc
which is currently passed in struct msghdr.
Reviewed-by: Jens Axboe
Reviewed-by: David Ahern
Signed-off-by: Pavel Begunkov
---
drivers/net/tap.c | 2 +-
drivers/net/tun.c | 2 +-
drivers/net/xen-netback/common.h| 5 ++---
drivers/net/xen-netback/interfac
io_notif_flush() is partially duplicating io_tx_ubuf_complete(), so
instead of duplicating it, make the flush call io_tx_ubuf_complete.
Reviewed-by: Jens Axboe
Signed-off-by: Pavel Begunkov
---
io_uring/notif.c | 6 +++---
io_uring/notif.h | 9 +++--
2 files changed, 6 insertions(+), 9
On 9/27/22 21:23, Paolo Abeni wrote:
On Tue, 2022-09-27 at 21:17 +0100, Pavel Begunkov wrote:
On 9/27/22 20:59, Paolo Abeni wrote:
On Tue, 2022-09-27 at 19:48 +0100, Pavel Begunkov wrote:
On 9/27/22 18:56, Paolo Abeni wrote:
On Tue, 2022-09-27 at 18:16 +0100, Pavel Begunkov wrote:
On 9/27
On 9/27/22 20:59, Paolo Abeni wrote:
On Tue, 2022-09-27 at 19:48 +0100, Pavel Begunkov wrote:
On 9/27/22 18:56, Paolo Abeni wrote:
On Tue, 2022-09-27 at 18:16 +0100, Pavel Begunkov wrote:
On 9/27/22 15:28, Pavel Begunkov wrote:
Hello Paolo,
On 9/27/22 14:49, Paolo Abeni wrote:
Hello,
On
On 9/27/22 18:56, Paolo Abeni wrote:
On Tue, 2022-09-27 at 18:16 +0100, Pavel Begunkov wrote:
On 9/27/22 15:28, Pavel Begunkov wrote:
Hello Paolo,
On 9/27/22 14:49, Paolo Abeni wrote:
Hello,
On Fri, 2022-09-23 at 17:39 +0100, Pavel Begunkov wrote:
struct ubuf_info is large but not all
On 9/27/22 15:28, Pavel Begunkov wrote:
Hello Paolo,
On 9/27/22 14:49, Paolo Abeni wrote:
Hello,
On Fri, 2022-09-23 at 17:39 +0100, Pavel Begunkov wrote:
struct ubuf_info is large but not all fields are needed for all
cases. We have limited space in io_uring for it and large ubuf_info
Hello Paolo,
On 9/27/22 14:49, Paolo Abeni wrote:
Hello,
On Fri, 2022-09-23 at 17:39 +0100, Pavel Begunkov wrote:
struct ubuf_info is large but not all fields are needed for all
cases. We have limited space in io_uring for it and large ubuf_info
prevents some struct embedding, even though we
tches.
Signed-off-by: Pavel Begunkov
---
include/linux/skbuff.h | 21 +
1 file changed, 21 insertions(+)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index f15d5b62539b..fd7dcb977fdf 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -554,7 +5
struct ubuf_info will be changed, use ubuf_info_msgzc instead.
Signed-off-by: Pavel Begunkov
---
drivers/vhost/net.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 68e4ecd1cc0e..d7a04d573988 100644
--- a
struct ubuf_info will be changed, use ubuf_info_msgzc instead.
Signed-off-by: Pavel Begunkov
---
drivers/net/xen-netback/common.h| 2 +-
drivers/net/xen-netback/interface.c | 4 ++--
drivers/net/xen-netback/netback.c | 7 ---
3 files changed, 7 insertions(+), 6 deletions(-)
diff
ning on top by creating
new structs containing ubuf_info but with proper types.
Pavel Begunkov (4):
net: introduce struct ubuf_info_msgzc
xen/netback: use struct ubuf_info_msgzc
vhost/net: use struct ubuf_info_msgzc
net: shrink struct ubuf_info
drivers/net/xen-netback/common.h| 2 +-
d
We can benefit from a smaller struct ubuf_info, so leave only mandatory
fields and let users to decide how they want to extend it. Convert
MSG_ZEROCOPY to struct ubuf_info_msgzc and remove duplicated fields.
This reduces the size from 48 bytes to just 16.
Signed-off-by: Pavel Begunkov
Add UARGFL_CALLER_PINNED letting protocols know that the caller holds a
reference to the ubuf_info and so it doesn't need additional refcounting
for purposes of keeping it alive. With that TCP can save a refcount
put/get pair per send when used with ->msg_ubuf.
Signed-off-by: Pavel
We can benefit from a smaller struct ubuf_info, so leave only mandatory
fields and let users to decide how they want to extend it. Convert
MSG_ZEROCOPY to struct ubuf_info_msgzc and remove duplicated fields.
This reduces the size from 48 bytes to just 16.
Signed-off-by: Pavel Begunkov
We always keep references to active notifications and drop them only
when we flush, so they're always pinned during sock_sendmsg() and we can
add UARGFL_CALLER_PINNED.
Signed-off-by: Pavel Begunkov
---
io_uring/notif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_
Add a helper for dropping notification references during flush. It's a
preparation patch, currently it's only one master ref, but we're going
to add ref caching.
Signed-off-by: Pavel Begunkov
---
io_uring/notif.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-
Cache some active notifier references at the io_uring side and get them
in batches, so the ammortised cost is low. Then these references can be
given away to the network layer using UARGFL_GIFT_REF.
Signed-off-by: Pavel Begunkov
---
io_uring/net.c | 8 +++-
io_uring/notif.c | 6
tches.
Signed-off-by: Pavel Begunkov
---
include/linux/skbuff.h | 21 +
1 file changed, 21 insertions(+)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index ca8afa382bf2..f8ac3678dab8 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -554,7 +5
There are already skb_flags in ubuf_info, which enhancing skbs. Also add
flags controlling ubuf_info, mainly to hint about various referencing
aspects of it, which will be introduced in later patches.
Signed-off-by: Pavel Begunkov
---
include/linux/skbuff.h | 1 +
io_uring/notif.c | 1
ubuf_info::flags contains SKBFL_* flags that we copy into skbs, change
the field name to stress that it keeps skb flags.
Signed-off-by: Pavel Begunkov
---
include/linux/skbuff.h | 4 ++--
io_uring/notif.c | 2 +-
net/core/skbuff.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions
struct ubuf_info will be changed, use ubuf_info_msgzc instead.
Signed-off-by: Pavel Begunkov
---
drivers/net/xen-netback/common.h| 2 +-
drivers/net/xen-netback/interface.c | 4 ++--
drivers/net/xen-netback/netback.c | 7 ---
3 files changed, 7 insertions(+), 6 deletions(-)
diff
struct ubuf_info will be changed, use ubuf_info_msgzc instead.
Signed-off-by: Pavel Begunkov
---
drivers/vhost/net.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 68e4ecd1cc0e..9b616536dd9e 100644
--- a
network decides to take the ref it should
clear the flag.
Signed-off-by: Pavel Begunkov
---
include/linux/skbuff.h | 14 ++
net/ipv4/ip_output.c | 1 +
net/ipv6/ip6_output.c | 1 +
3 files changed, 16 insertions(+)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
patchset and some more [1] showed ~1.6% qps improvement for UDP (dummy dev),
and ~1% for TCP (localhost + hacks enabling zc).
I didn't specifically test xen and vhost and not sure how, would love
some help with that.
[1] https://github.com/isilence/linux/tree/net/zc-ref-optimisation
Pav
28 matches
Mail list logo