lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zky0Bl+H8aWCVP3m@MiWiFi-R3L-srv>
Date: Tue, 21 May 2024 22:47:34 +0800
From: Baoquan He <bhe@...hat.com>
To: Eric Chanudet <echanude@...hat.com>
Cc: Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Zhen Lei <thunder.leizhen@...wei.com>,
	Yajun Deng <yajun.deng@...ux.dev>,
	"Mike Rapoport (IBM)" <rppt@...nel.org>,
	Zhang Jianhua <chris.zjh@...wei.com>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64: init: override deferred_page_init_max_threads

On 05/20/24 at 07:15pm, Eric Chanudet wrote:
> This was the behavior prior to making the function arch-specific with
> commit ecd096506922 ("mm: make deferred init's max threads
> arch-specific")
> 
> Architectures can override the generic implementation that uses only one
> CPU. 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%) |
> 
> Signed-off-by: Eric Chanudet <echanude@...hat.com>
> ---
>  arch/arm64/mm/init.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> index 9b5ab6818f7f..71f5188fe63d 100644
> --- a/arch/arm64/mm/init.c
> +++ b/arch/arm64/mm/init.c
> @@ -158,6 +158,13 @@ static void __init zone_sizes_init(void)
>  	free_area_init(max_zone_pfns);
>  }
>  
> +#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
> +int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask)
> +{
> +	return max_t(int, cpumask_weight(node_cpumask), 1);
> +}
> +#endif

LGTM,

Reviewed-by: Baoquan He <bhe@...hat.com>

> +
>  int pfn_is_map_memory(unsigned long pfn)
>  {
>  	phys_addr_t addr = PFN_PHYS(pfn);
> -- 
> 2.44.0
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ