summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorRam Muthiah <rammuthiah@google.com>2021-01-26 20:27:32 -0800
committerRam Muthiah <rammuthiah@google.com>2021-03-25 02:03:06 +0000
commit93fb0db791be7e8df3d91d046a4259e341782972 (patch)
tree9848de48a2b81dd478538eccaeb661fbf69fbaa2 /net
parentff91fba478b0b7e2b81b13de25e9a226f1daf296 (diff)
ANDROID: Make vsock virtio packet buff size configurable
When the android virtual device stays up for long periods of time, the SLAB sustains everincreasing fragmentation. Contributing to this fragmentation are the virtio packet buffer allocations which are a drain on 64Kb compound pages. Eventually these can't be allocated due to fragmentation. To enable successful allocations for this packet buffer, the packet buffer's size needs to be reduced. To enable a reduction without impacting other partners, this var is being exposed as a command line param. Bug: 149494272 Test: atest ManagedProfileLifecycleStressTest#testCreateStartDelete on local cuttlefish device Signed-off-by: Ram Muthiah <rammuthiah@google.com> Change-Id: Ia4f9180025b64d61d9e2b882daa84460b8f08fd2
Diffstat (limited to 'net')
-rw-r--r--net/vmw_vsock/virtio_transport_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
index 9c07c76c504d..ddcae46ae408 100644
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -25,6 +25,10 @@
/* How long to wait for graceful shutdown of a connection */
#define VSOCK_CLOSE_TIMEOUT (8 * HZ)
+uint virtio_transport_max_vsock_pkt_buf_size = 64 * 1024;
+module_param(virtio_transport_max_vsock_pkt_buf_size, uint, 0444);
+EXPORT_SYMBOL_GPL(virtio_transport_max_vsock_pkt_buf_size);
+
static const struct virtio_transport *virtio_transport_get_ops(void)
{
const struct vsock_transport *t = vsock_core_get_transport();