Files
linux-stable-mirror/include/linux
Will Deacon 680c7d9d91 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:30:40 +02:00
..
2025-03-07 18:25:35 +01:00
2025-07-10 16:05:08 +02:00
2025-05-29 11:03:25 +02:00
2024-12-14 20:03:35 +01:00
2025-05-29 11:03:25 +02:00
2025-05-29 11:02:23 +02:00
2025-03-28 22:03:30 +01:00
2025-01-17 13:40:50 +01:00
2025-02-08 09:57:23 +01:00
2025-06-19 15:32:18 +02:00
2025-04-20 10:15:25 +02:00
2025-04-20 10:15:49 +02:00
2025-05-29 11:02:20 +02:00
2025-08-15 12:13:35 +02:00
2025-01-23 17:22:53 +01:00
2025-02-01 18:39:35 +01:00
2025-02-27 04:30:19 -08:00
2025-08-01 09:48:43 +01:00
2025-07-10 16:05:11 +02:00