On Mon, Nov 1, 2021 at 5:01 AM Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> wrote: > > On Fri, 29 Oct 2021 12:51:27 -0700 > Dan Williams <dan.j.williams@xxxxxxxxx> wrote: > > > Hi Rafael, > > > > While reviewing "[PATCH v3] ACPI: NUMA: Add a node and memblk for each > > CFMWS not in SRAT" [1]. I noticed that it was open coding CEDT sub-table > > parsing in a similar fashion as drivers/cxl/acpi.c. The driver open > > coded the parsing because the ACPI sub-table helpers are marked __init. > > In order to avoid the ongoing maintenance burden of a split between > > "early" and "late" ACPI sub-table parsing this series proposes to make > > those helpers available to drivers. > > > > The savings in drivers/cxl/ are: > > > > drivers/cxl/Kconfig | 1 > > drivers/cxl/acpi.c | 234 +++++++++++++++++++-------------------------------- > > 2 files changed, 88 insertions(+), 147 deletions(-) > > > > ...and 15 lines new code not added are saved in this new version of > > "ACPI: NUMA: Add a node and memblk for each CFMWS not in SRAT". > > > > Let me know if this looks ok to you and I can carry it in the CXL tree > > (i.e. after the merge window, for v5.17 consideration). > > > > [1]: https://lore.kernel.org/r/20211019050908.449231-1-alison.schofield@xxxxxxxxx > > Is it worth the complexity of the __init_or_acpilib and export part? > Seems like a fiddly dance for what looks to be minor savings... It follows the __initdata_or_meminfo precedent that identifies data that is normally __init unless a specific driver needs it. The lesson from the tinyconfig effort was that image size dies a death of many cuts unless care is taken to preserve minor savings. Yes, it's likely trivial in this case, but it's at least a gesture to avoid bloating the kernel image size unnecessarily when the kernel has gotten by so long with this infrastructure being purely __init.