diff options
| author | Will Deacon <[email protected]> | 2025-07-17 09:01:11 +0000 |
|---|---|---|
| committer | Michael S. Tsirkin <[email protected]> | 2025-08-01 13:11:09 +0000 |
| commit | 03a92f036a04fed2b00d69f5f46f1a486e70dc5c (patch) | |
| tree | 8e9c259031e3ed99f41fb1a4286f10f5a3afdcd8 /drivers/pci/controller/dwc/pcie-qcom-common.c | |
| parent | vsock/virtio: Move length check to callers of virtio_vsock_skb_rx_put() (diff) | |
| download | kernel-03a92f036a04fed2b00d69f5f46f1a486e70dc5c.tar.gz kernel-03a92f036a04fed2b00d69f5f46f1a486e70dc5c.zip | |
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 <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-qcom-common.c')
0 files changed, 0 insertions, 0 deletions
