Thread (83 messages) 83 messages, 14 authors, 2021-10-08

Re: [PATCH v2 00/12] arm64: Kconfig: Update ARCH_EXYNOS select configs

From: Olof Johansson <hidden>
Date: 2021-10-01 16:00:12
Also in: linux-clk, linux-gpio, linux-rtc, linux-samsung-soc, lkml

On Fri, Oct 1, 2021 at 4:59 AM Geert Uytterhoeven [off-list ref] wrote:
Hi Olof,

On Fri, Oct 1, 2021 at 7:36 AM Olof Johansson [off-list ref] wrote:
quoted
A much more valuable approach would be to work towards being able to
free up memory by un-probed drivers at the end of boot. That would
possibly benefit all platforms on all architectures.
We used to have such a functionality in arch/ppc (not arch/powerpc!),
where code/data could be tagged __prep, __chrp, or __pmac, to put it
in a special section, and to be freed with initdata when unused.  It
was removed in v2.6.15[1], as the savings weren't worth the hassle.
In a more fragmented space like arm the memory lost due to alignment
of the sections would be even more substantial.
Yeah, the balance between per-platform code size and overall kernel
code size shifted over time to a point where it wasn't as meaningful
on ppc.
Another problem is to know when is the end of the boot, especially
with deferred probing.
Most of this code either has a module_init() or an initcall that
actually registers the drivers and/or probes for the platform and does
the work.

This means you can have a late equivalent hook/initcall that
determines whether this path ended up being probed/used. If it wasn't,
you can then unregister and flag the corresponding memory to be freed
at the end, and would take out the heuristics and guessing on needing
to do it automatically from the code path that's doing said freeing.


-Olof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help