{"id":170548,"date":"2022-12-28T09:36:57","date_gmt":"2022-12-28T09:36:57","guid":{"rendered":"https:\/\/harchi90.com\/new-patches-aim-to-reduce-memory-use-while-compiling-the-linux-kernel\/"},"modified":"2022-12-28T09:36:57","modified_gmt":"2022-12-28T09:36:57","slug":"new-patches-aim-to-reduce-memory-use-while-compiling-the-linux-kernel","status":"publish","type":"post","link":"https:\/\/harchi90.com\/new-patches-aim-to-reduce-memory-use-while-compiling-the-linux-kernel\/","title":{"rendered":"New Patches Aim To Reduce Memory Use While Compiling The Linux Kernel"},"content":{"rendered":"
Happy Holidays<\/strong> If you have enjoyed reading the new and original content on Phoronix each and every day this year, consider showing your support by the end of year \/ holiday deal on Phoronix Premium. Phoronix Premium helps make operations possible while you get to enjoy ad-free viewing and multi-page articles on a single page. There have been more than 2,800 news articles and 185+ Linux hardware reviews written this year by your’s truly, but unfortunately, operations remain difficult driven by extreme ad-block use.<\/p>\n Updated patches were sent out today that aim to reduce the maximum memory usage while compiling the Linux kernel. In turn for memory constrained systems that attempt to compile the kernel this should lead to less swapping and faster build times.<\/p>\n Thomas Wei\u00dfschuh sent out his latest patches aiming to reduce the maximum memory use while compiling the Linux kernel. In particular, he’s taking aim at the memory use of processing the vmlinux.o object with objtool, which is the most memory intensive step for the kernel build process. <\/p>\n The set of eight patches make adjustments to the objtool code to reduce memory use. In particular, switching from malloc() in a loop to calloc() out of a loop in objtool code yielded a reduction of 3.7% in peak memory use while processing vmlinux.o. Reducing the memory usage of the struct reloc lowered the memory use by another 3.8% in another kernel build by Thomas. Optimizing the layout of the struct symbol lowered memory use by 0.5% and then a few other optimizations without noted improvements.<\/p>\n Long story short, this patch series undergoing review should help in reducing peak memory use while compiling the Linux kernel and in turn help out with builds particularly for systems with limited amounts of RAM that may otherwise hit swapping during the build process that in turn will cause the build speed to suffer.<\/p>\n<\/div>\n .<\/p>\n","protected":false},"excerpt":{"rendered":" Happy Holidays If you have enjoyed reading the new and original content on Phoronix each and every day this year, consider showing your support by the end of year \/ holiday deal on Phoronix Premium. Phoronix Premium helps make operations possible while you get to enjoy ad-free viewing and multi-page articles on a single page. …<\/p>\n
\n<\/p>\n