All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/1] Skip over regions of invalid pfns with NUMA=n && HAVE_MEMBLOCK=y
@ 2018-01-24 14:35 ` Eugeniu Rosca
  0 siblings, 0 replies; 24+ messages in thread
From: Eugeniu Rosca @ 2018-01-24 14:35 UTC (permalink / raw)
  To: Matthew Wilcox, Andrew Morton, Michal Hocko, Catalin Marinas,
	Ard Biesheuvel, Steven Sistare, AKASHI Takahiro, Pavel Tatashin,
	Gioh Kim, Heiko Carstens, Wei Yang, Miles Chen, Vlastimil Babka,
	Mel Gorman, Johannes Weiner, Paul Burton, James Hartley
  Cc: Eugeniu Rosca, linux-kernel, linux-mm

Hello MM/kernel experts,

I include this cover letter to present some background and motivation
behind the patch, although the description included in the patch itself
should be rich enough already.

The context of this change is some effort to optimize the boot time of
Rcar Gen3 SoC family, which at its roots is driven by automotive
requirements like (well-known?) "2-seconds-to-rear-view-camera".

To fulfill those, we create a defconfig based on vanilla arm64
defconfig, which is then tailored to Rcar Gen3 SoC needs. This allows
us to reduce the kernel binary image size by almost 50%. We are very
picky during this cleanup process, to the point that, as showcased
with this patch, we start to submit changes in MM core part, where
(to be honest) we don't have much expertise.

As mentioned in the description of attached patch, disabling NUMA in
the v4.15-rc9 arm64 kernel decreases the binary Image by 64kB, but,
at the same time, increases the H3ULCB boot time by ~140ms, which is
counterintuitive, since by disabling NUMA we expect to get rid of
unused NUMA infrastructure and skip unneeded NUMA init.

As already mentioned in the attached patch, the slowdown happens because
v4.11-rc1 commit b92df1de5d28 ("mm: page_alloc: skip over regions of
invalid pfns where possible") conditions itself on
CONFIG_HAVE_MEMBLOCK_NODE_MAP, which on arm64 depends on NUMA:
$> git grep HAVE_MEMBLOCK_NODE_MAP | grep arm64
arch/arm64/Kconfig:     select HAVE_MEMBLOCK_NODE_MAP if NUMA

The attached patch attempts to present some evidence that the
aforementioned commit can speed up the execution of memmap_init_zone()
not only on arm64 NUMA, but also on arm64 non-NUMA machines. This is
achieved by "relaxing" the dependency of memblock_next_valid_pfn()
from being guarded by CONFIG_HAVE_MEMBLOCK_NODE_MAP to being
guarded by the more generic CONFIG_HAVE_MEMBLOCK.

If this doesn't sound or feel right, I would appreciate your feedback.
I will definitely participate in testing any alternative proposals
that may arise in your mind. TIA!

Best regards,
Eugeniu.

Changes v2->v3:
- Fix review comments from Matthew Wilcox (get rid of compile-time
  guards in mm/page_alloc.c).
- Rebase and re-measure the boot time improvement on v4.15-rc9

Changes v1->v2:
- Fix ARCH=tile build error, signalled by kbuild test robot
- Rebase and re-measure the boot time improvement on v4.15-rc8

Eugeniu Rosca (1):
  mm: page_alloc: skip over regions of invalid pfns on UMA

 include/linux/memblock.h | 1 -
 include/linux/mm.h       | 6 ++++++
 mm/memblock.c            | 2 ++
 mm/page_alloc.c          | 2 --
 4 files changed, 8 insertions(+), 3 deletions(-)

-- 
2.15.1

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2018-02-17 22:48 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 14:35 [PATCH v3 0/1] Skip over regions of invalid pfns with NUMA=n && HAVE_MEMBLOCK=y Eugeniu Rosca
2018-01-24 14:35 ` Eugeniu Rosca
2018-01-24 14:35 ` [PATCH v3 1/1] mm: page_alloc: skip over regions of invalid pfns on UMA Eugeniu Rosca
2018-01-24 14:35   ` Eugeniu Rosca
2018-01-24 16:27   ` Pavel Tatashin
2018-01-24 16:27     ` Pavel Tatashin
2018-01-29 17:06     ` Eugeniu Rosca
2018-01-29 17:06       ` Eugeniu Rosca
2018-01-29 18:47   ` Michal Hocko
2018-01-29 18:47     ` Michal Hocko
2018-02-03 12:24     ` Eugeniu Rosca
2018-02-03 12:24       ` Eugeniu Rosca
2018-02-09  0:12       ` Eugeniu Rosca
2018-02-09  0:12         ` Eugeniu Rosca
2018-02-12 15:03       ` Michal Hocko
2018-02-12 15:03         ` Michal Hocko
2018-02-12 16:16         ` Eugeniu Rosca
2018-02-12 16:16           ` Eugeniu Rosca
2018-02-12 18:47           ` Michal Hocko
2018-02-12 18:47             ` Michal Hocko
2018-02-17  0:43             ` Andrew Morton
2018-02-17  0:43               ` Andrew Morton
2018-02-17 22:48               ` Eugeniu Rosca
2018-02-17 22:48                 ` Eugeniu Rosca

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.