summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/xarray.py
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2025-07-17 10:01:11 +0100
committerMichael S. Tsirkin <mst@redhat.com>2025-08-01 09:11:09 -0400
commit03a92f036a04fed2b00d69f5f46f1a486e70dc5c (patch)
tree8e9c259031e3ed99f41fb1a4286f10f5a3afdcd8 /scripts/gdb/linux/xarray.py
parent87dbae5e36613a6020f3d64a2eaeac0a1e0e6dc6 (diff)
vsock/virtio: Resize receive buffers so that each SKB fits in a 4K page
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>
Diffstat (limited to 'scripts/gdb/linux/xarray.py')
0 files changed, 0 insertions, 0 deletions