linux-yocto/net
Will Deacon 07813354bb vsock/virtio: Resize receive buffers so that each SKB fits in a 4K page
[ Upstream commit 03a92f036a ]

When allocating receive buffers for the vsock virtio RX virtqueue, an
SKB is allocated with a 4140 data payload (the 44-byte packet header +
VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE). Even when factoring in the SKB
overhead, the resulting 8KiB allocation thanks to the rounding in
kmalloc_reserve() is wasteful (~3700 unusable bytes) and results in a
higher-order page allocation on systems with 4KiB pages just for the
sake of a few hundred bytes of packet data.

Limit the vsock virtio RX buffers to 4KiB per SKB, resulting in much
better memory utilisation and removing the need to allocate higher-order
pages entirely.

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Will Deacon <will@kernel.org>
Message-Id: <20250717090116.11987-5-will@kernel.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-20 18:41:21 +02:00
..
6lowpan
9p netfs: Fix the request's work item to not require a ref 2025-05-21 14:35:20 +02:00
802 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
8021q net: vlan: fix VLAN 0 refcount imbalance of toggling filtering during runtime 2025-07-17 07:44:26 -07:00
appletalk net: appletalk: Fix use-after-free in AARP proxy probe 2025-07-21 16:55:08 -07:00
atm atm: clip: Fix NULL pointer dereference in vcc_sendmsg() 2025-07-09 19:09:36 -07:00
ax25 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
batman-adv treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
bluetooth Bluetooth: hci_sock: Reset cookie to zero in hci_sock_free_cookie() 2025-08-20 18:41:05 +02:00
bpf
bridge net: bridge: Do not offload IGMP/MLD messages 2025-07-17 07:46:41 -07:00
caif caif: reduce stack size, again 2025-08-15 16:38:40 +02:00
can treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ceph
core net: ieee8021q: fix insufficient table-size assertion 2025-08-20 18:41:13 +02:00
dcb
devlink devlink: use DEVLINK_VAR_ATTR_TYPE_* instead of NLA_* in fmsg 2025-05-06 18:21:11 -07:00
dns_resolver
dsa net: dsa: tag_brcm: legacy: fix pskb_may_pull length 2025-05-30 19:20:18 -07:00
ethernet
ethtool Including fixes from bluetooth and wireless. 2025-06-12 09:50:36 -07:00
handshake
hsr treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ieee802154 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ife
ipv4 net: ipv4: fix incorrect MTU in broadcast routes 2025-08-20 18:41:08 +02:00
ipv6 ipv6: mcast: Check inet6_dev->dead under idev->mc_lock in __ipv6_dev_mc_inc(). 2025-08-20 18:41:11 +02:00
iucv
kcm net: kcm: Fix race condition in kcm_unattach() 2025-08-20 18:40:52 +02:00
key Revert "xfrm: destroy xfrm_state synchronously on net exit path" 2025-07-08 13:28:29 +02:00
l2tp net: annotate races around sk->sk_uid 2025-08-15 16:38:40 +02:00
l3mdev
lapb treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
llc treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
mac80211 wifi: mac80211: update radar_required in channel context after channel switch 2025-08-20 18:41:16 +02:00
mac802154
mctp net: mctp: Prevent duplicate binds 2025-08-20 18:41:08 +02:00
mpls mpls: Use rcu_dereference_rtnl() in mpls_route_input_rcu(). 2025-06-17 18:21:59 -07:00
mptcp net: annotate races around sk->sk_uid 2025-08-15 16:38:40 +02:00
ncsi net: ncsi: Fix buffer overflow in fetching version id 2025-08-20 18:41:19 +02:00
netfilter netfilter: nft_set_pipapo: prefer kvmalloc for scratch maps 2025-08-20 18:41:04 +02:00
netlabel calipso: unlock rcu before returning -EAFNOSUPPORT 2025-06-05 08:03:38 -07:00
netlink netlink: avoid infinite retry looping in netlink_unicast() 2025-08-20 18:40:45 +02:00
netrom treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
nfc NFC: nci: uart: Set tty->disc_data only in success path 2025-06-19 08:33:54 -07:00
nsh
openvswitch openvswitch: Allocate struct ovs_pcpu_storage dynamically 2025-06-17 14:47:46 +02:00
packet net/packet: fix a race in packet_set_ring() and packet_notifier() 2025-08-15 16:39:31 +02:00
phonet phonet/pep: Move call to pn_skb_get_dst_sockaddr() earlier in pep_sock_accept() 2025-07-17 07:30:27 -07:00
psample
qrtr
rds replace strncpy with strscpy_pad 2025-05-26 22:28:44 +02:00
rfkill
rose rose: fix dangling neighbour pointers in rose_rt_device_down() 2025-07-01 19:28:48 -07:00
rxrpc rxrpc: Fix to use conn aborts for conn-wide failures 2025-07-17 07:50:48 -07:00
sched net/sched: mqprio: fix stack out-of-bounds write in tc entry parsing 2025-08-15 16:39:27 +02:00
sctp sctp: linearize cloned gso packets in sctp_rcv 2025-08-20 18:40:51 +02:00
shaper
smc smc: Fix various oops due to inet_sock type confusion. 2025-07-14 17:12:42 -07:00
strparser strparser: Remove unused __strp_unpause 2025-05-05 16:48:12 -07:00
sunrpc sunrpc: fix handling of server side tls alerts 2025-08-15 16:39:30 +02:00
switchdev
tipc tipc: Fix use-after-free in tipc_conn_close(). 2025-07-07 18:38:24 -07:00
tls tls: handle data disappearing from under the TLS ULP 2025-08-20 18:40:52 +02:00
unix af_unix: Don't set -ECONNRESET for consumed OOB skb. 2025-06-24 10:10:07 +02:00
vmw_vsock vsock/virtio: Resize receive buffers so that each SKB fits in a 4K page 2025-08-20 18:41:21 +02:00
wireless wifi: cfg80211: reject HTC bit for management frames 2025-08-20 18:41:06 +02:00
x25 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
xdp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-22 09:42:41 -07:00
xfrm xfrm: Duplicate SPI Handling 2025-08-20 18:41:13 +02:00
compat.c
devres.c
Kconfig net: Kconfig NET_DEVMEM selects GENERIC_ALLOCATOR 2025-05-27 17:31:42 -07:00
Kconfig.debug
Makefile
socket.c net: annotate races around sk->sk_uid 2025-08-15 16:38:40 +02:00
sysctl_net.c