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] [day] [month] [year] [list]
Date:   Thu, 10 Mar 2022 14:24:38 +0800
From:   Baolin Wang <baolin.wang@...ux.alibaba.com>
To:     Oscar Salvador <osalvador@...e.de>,
        "Huang, Ying" <ying.huang@...el.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Abhishek Goel <huntbag@...ux.vnet.ibm.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: Only re-generate demotion targets when a numa node
 changes its N_CPU state

Hi Oscar,

On 3/10/2022 1:48 PM, Oscar Salvador wrote:
> On Thu, Mar 10, 2022 at 08:39:53AM +0800, Huang, Ying wrote:
>> We need to call set_migration_target_nodes() during system boot
>> somewhere, either here or in init_mm_internals().
> 
> Hi Huang Ying,
> 
> vmstat_cpu_online() already gets called during boot:
> 
> static struct cpuhp_step cpuhp_hp_states[] = {
> ...
> 	#ifdef CONFIG_SMP
> 	[CPUHP_CREATE_THREADS]= {
> 		.name			= "threads:prepare",
> 		.startup.single		= smpboot_create_threads,
> 		.teardown.single	= NULL,
> 		.cant_stop		= true,
> 	},
> ...
> 
> smpboot_create_threads
>   __smpboot_create_thread
>    smpboot_thread_fn
>     ht->thread_fn()
>      cpuhp_thread_fun
>       cpuhp_invoke_callback
>        vmstat_cpu_online
> 
> That for every CPU that is brought up during boot.
> 
> So unless I am missing something, I would say we are already covered
> there, right?

I've tested your patch, unfortunately it can not work. It already set 
the node with N_CPU state in init_cpu_node_state() earlier, so in 
vmstat_cpu_online() ,the sentence 'if(!node_state(cpu_to_node(cpu), 
N_CPU))' is always false, which means it will not call 
set_migration_target_nodes().

Like Huang Ying said, we should call set_migration_target_nodes() in 
migrate_on_reclaim_init() or init_mm_internals().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ