Jason A. Donenfeld a4e9f8e328 wireguard: peer: allocate in kmem_cache
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: 8b5553ace83c ("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>
2021-06-04 14:25:14 -07:00
..
2021-05-15 08:32:51 -07:00
2021-05-05 13:24:11 -07:00
2021-05-16 10:13:14 -07:00
2021-04-18 09:36:56 +03:00
2021-05-15 08:52:30 -07:00
2021-04-26 12:11:52 -07:00
2021-05-20 06:31:52 -10:00
2021-04-28 15:59:13 -07:00
2021-05-20 14:46:26 -10:00
2021-04-26 12:11:52 -07:00
2021-05-20 20:15:43 -10:00
2021-04-27 18:09:44 -07:00
2021-05-20 06:31:52 -10:00
2021-05-01 10:14:08 -07:00
2021-05-05 13:24:11 -07:00
2021-05-13 14:53:49 -04:00
2021-04-28 15:59:13 -07:00
2021-05-20 06:40:20 -10:00
2021-05-01 10:14:08 -07:00
2021-04-29 11:57:23 -07:00
2021-05-05 12:53:16 -07:00
2021-04-28 15:59:13 -07:00
2021-05-04 11:13:33 -07:00
2021-05-05 13:24:11 -07:00
2021-05-03 12:15:21 -07:00
2021-05-07 11:35:12 -07:00
2021-05-20 14:41:35 -10:00
2021-05-01 09:33:00 -07:00
2021-05-08 10:44:36 -07:00
2021-05-17 16:06:02 +02:00
2021-05-20 06:31:52 -10:00
2021-05-16 10:13:14 -07:00
2021-05-01 09:33:00 -07:00
2021-05-05 13:31:39 -07:00
2021-05-20 06:31:52 -10:00
2021-04-28 15:59:13 -07:00
2021-05-05 13:31:39 -07:00