summaryrefslogtreecommitdiff
path: root/drivers/net/wireguard/allowedips.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-06-04 17:17:34 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2022-07-07 13:26:44 +0200
commit7a9b540209657a0e780937b76320e9627886a6fe (patch)
tree0cfcd97fd39cd3a12764a2c1b1a39d3372efef32 /drivers/net/wireguard/allowedips.c
parentb355f09d8d8cea9ccd9988f21f04543e968833cf (diff)
downloadwireguard-linux-trimmed-7a9b540209657a0e780937b76320e9627886a6fe.tar.gz
wireguard-linux-trimmed-7a9b540209657a0e780937b76320e9627886a6fe.zip
wireguard: peer: allocate in kmem_cache
commit a4e9f8e3287c9eb6bf70df982870980dd3341863 upstream. With deployments having upwards of 600k peers now, this somewhat heavy structure could benefit from more fine-grained allocations. Specifically, instead of using a 2048-byte slab for a 1544-byte object, we can now use 1544-byte objects directly, thus saving almost 25% per-peer, or with 600k peers, that's a savings of 303 MiB. This also makes wireguard's memory usage more transparent in tools like slabtop and /proc/slabinfo. Fixes: b955554b47af ("wireguard: queueing: get rid of per-peer ring buffers") Suggested-by: Arnd Bergmann <arnd@arndb.de> Suggested-by: Matthew Wilcox <willy@infradead.org> Cc: stable@vger.kernel.org Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'drivers/net/wireguard/allowedips.c')
0 files changed, 0 insertions, 0 deletions