On Wed, Dec 07, 2016 at 11:40:00AM -0800, Scott Branden wrote:A single Image is not entirely possible when the system needs to be tuned for memory usage, boot time, and other performance related issues. These are key features in embedded systems vs. general purpose computers.
Make MAX_PHYSMEM_BITS and SECTIONS_SIZE_BITS configurable by adding
config options.
Default to current settings currently defined in sparesmem.h.
For systems wishing to save memory the config options can be overridden.
Example, changing MAX_PHYSMEM_BITS from 48 to 36 at the same time as
changing SECTION_SIZE_BITS from 30 to 26 frees 13MB of memory.
I'm not keen on such change, it's a big departure from the single Image
aims.
feasible, like in this patch:This patch does not meet my requirements as I need SECTION_SIZE_BITS to be set to 28 to reduce memory and to allow memory hotplug to allocate a 256 MB section. My patch future proofs the tuning of the parameters by allowing any section size to be made. I could combine the patch you list such that SECTION_SIZE_BITS defaults to 30 when CONFIG_ARM64_64_PAGES is selected and 27 otherwise. Should it default to something else for 16K and 4K pages?
http://lkml.kernel.org/r/1465821119-3384-1-git-send-email-jszhang@xxxxxxxxxxx