[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZlbLAg94/2SC24Qz@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com>
Date: Wed, 29 May 2024 08:28:18 +0200
From: Alexander Gordeev <agordeev@...ux.ibm.com>
To: Eric Chanudet <echanude@...hat.com>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, "H. Peter Anvin" <hpa@...or.com>,
Mike Rapoport <rppt@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>, Baoquan He <bhe@...hat.com>,
Michael Ellerman <mpe@...erman.id.au>, Nick Piggin <npiggin@...il.com>,
x86@...nel.org, linux-arm-kernel@...ts.infradead.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linux-s390@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v3] mm/mm_init: use node's number of cpus in
deferred_page_init_max_threads
On Tue, May 28, 2024 at 02:54:58PM -0400, Eric Chanudet wrote:
> When DEFERRED_STRUCT_PAGE_INIT=y, use a node's cpu count as maximum
> thread count for the deferred initialization of struct pages via padata.
> This should result in shorter boot times for these configurations by
> going through page_alloc_init_late() faster as systems tend not to be
> under heavy load that early in the bootstrap.
>
> Only x86_64 does that now. Make it archs agnostic when
> DEFERRED_STRUCT_PAGE_INIT is set. With the default defconfigs, that
> includes powerpc and s390.
>
> It used to be so before offering archs to override the function for
> tuning with commit ecd096506922 ("mm: make deferred init's max threads
> arch-specific").
>
> Setting DEFERRED_STRUCT_PAGE_INIT and testing on a few arm64 platforms
> shows faster deferred_init_memmap completions:
> | | x13s | SA8775p-ride | Ampere R137-P31 | Ampere HR330 |
> | | Metal, 32GB | VM, 36GB | VM, 58GB | Metal, 128GB |
> | | 8cpus | 8cpus | 8cpus | 32cpus |
> |---------|-------------|--------------|-----------------|--------------|
> | threads | ms (%) | ms (%) | ms (%) | ms (%) |
> |---------|-------------|--------------|-----------------|--------------|
> | 1 | 108 (0%) | 72 (0%) | 224 (0%) | 324 (0%) |
> | cpus | 24 (-77%) | 36 (-50%) | 40 (-82%) | 56 (-82%) |
>
> Michael Ellerman on a powerpc machine (1TB, 40 cores, 4KB pages) reports
> faster deferred_init_memmap from 210-240ms to 90-110ms between nodes.
>
> Signed-off-by: Eric Chanudet <echanude@...hat.com>
> Tested-by: Michael Ellerman <mpe@...erman.id.au> (powerpc)
>
> ---
> - v1: https://lore.kernel.org/linux-arm-kernel/20240520231555.395979-5-echanude@redhat.com
> - Changes since v1:
> - Make the generic function return the number of cpus of the node as
> max threads limit instead overriding it for arm64.
> - Drop Baoquan He's R-b on v1 since the logic changed.
> - Add CCs according to patch changes (ppc and s390 set
> DEFERRED_STRUCT_PAGE_INIT by default).
>
> - v2: https://lore.kernel.org/linux-arm-kernel/20240522203758.626932-4-echanude@redhat.com/
> - Changes since v2:
> - deferred_page_init_max_threads returns unsigned and use max instead
> of max_t.
> - Make deferred_page_init_max_threads static since there are no more
> override.
> - Rephrase description.
> - Add T-b and report from Michael Ellerman.
>
> arch/x86/mm/init_64.c | 12 ------------
> include/linux/memblock.h | 2 --
> mm/mm_init.c | 5 ++---
> 3 files changed, 2 insertions(+), 17 deletions(-)
It does speed up. For s390:
Acked-by: Alexander Gordeev <agordeev@...ux.ibm.com>
Powered by blists - more mailing lists