module: avoid all memory pressure due to duplicates
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 50 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | fs/kernel_read_file: add support for duplicate detectionfs/ fs/ include/ | +141 | 9 replies | |
| 2/2 | module: add support to avoid duplicates early on loadinclude/ kernel/ kernel/ +1 more | +34 | 41 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Luis Chamberlain | Dan Williams | David Hildenbrand | Rudi Heitbaum | Johan Hovold |
|---|---|---|---|---|---|
| 1/2 | |||||
| 2/2 | T-b T-b | T-b | T-b | T-b | R-b T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [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(-)
Signature · 1 line
2.39.2