summaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-05-20 14:36:41 +0200
committerMichael Bestas <mkbestas@lineageos.org>2021-07-23 02:44:47 +0300
commitf6bcc677e7db3d8a39dfaa73c4a17fc4fb3f984b (patch)
treeaf5b09eb4c7a07d7b3744da05cccc4046f9d04dc /scripts/patch-kernel
parentd6e91ca8541bfeb4b5cee5b3d48627af466a96f1 (diff)
allowedips: allocate nodes in kmem_cache
The previous commit moved from O(n) to O(1) for removal, but in the process introduced an additional pointer member to a struct that increased the size from 60 to 68 bytes, putting nodes in the 128-byte slab. With deployed systems having as many as 2 million nodes, this represents a significant doubling in memory usage (128 MiB -> 256 MiB). Fix this by using our own kmem_cache, that's sized exactly right. This also makes wireguard's memory usage more transparent in tools like slabtop and /proc/slabinfo. Suggested-by: Arnd Bergmann <arnd@arndb.de> Suggested-by: Matthew Wilcox <willy@infradead.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Change-Id: Iabf9dabe6a6a36aceff23e3021d51c079c9525e4
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions