[lkml]   [2023]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/2] module: avoid all memory pressure due to duplicates
We now know that duplicate kernel module loading can incur considerable
vmalloc memory pressure on boot. Module loading uses vmalloc space 3 times
in the worst case. Detecting duplicates early before processing the module
name was the last mile we had to go and we recently were debating if userspace
should fix this or the kernel should fix this. We decided to punt the problem
to userspace.

At LSFMM 2023 in Vancouver this year I talked to Lennart Poettering about this
and described the issue with udev. Fixing this in userspace would be complex,
and it was preferable if we could resolve this in-kernel. And indeed it is
possible to resolve it relatively easily in-kernel with just the inode. So
let's do that and be done with the issue.

Patch #2 has the details on the savings on a 255 CPU system.

With this we get 0 bytes wasted incurred due to duplicates.

Luis Chamberlain (2):
fs/kernel_read_file: add support for duplicate detection
module: add support to avoid duplicates early on load

fs/Kconfig | 3 +
fs/kernel_read_file.c | 124 +++++++++++++++++++++++++++++++
include/linux/kernel_read_file.h | 14 ++++
include/linux/module.h | 1 +
kernel/module/Kconfig | 20 +++++
kernel/module/internal.h | 1 +
kernel/module/main.c | 19 +++--
7 files changed, 175 insertions(+), 7 deletions(-)


 \ /
  Last update: 2023-05-24 23:37    [W:0.017 / U:4.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site