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:   Tue, 28 Sep 2021 09:21:56 +0800
From:   "Huang, Ying" <ying.huang@...el.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Yang Shi <shy828301@...il.com>, Zi Yan <ziy@...dia.com>,
        Michal Hocko <mhocko@...e.com>, Wei Xu <weixugc@...gle.com>,
        Oscar Salvador <osalvador@...e.de>,
        David Rientjes <rientjes@...gle.com>,
        Dan Williams <dan.j.williams@...el.com>,
        David Hildenbrand <david@...hat.com>,
        Greg Thelen <gthelen@...gle.com>,
        Keith Busch <kbusch@...nel.org>
Subject: Re: [PATCH -V2] mm/migrate: fix CPUHP state to update node demotion
 order

Andrew Morton <akpm@...ux-foundation.org> writes:

> On Mon, 27 Sep 2021 16:11:00 +0800 Huang Ying <ying.huang@...el.com> wrote:
>
>> The node demotion order needs to be updated during CPU hotplug.
>> Because whether a NUMA node has CPU may influence the demotion order.
>> The update function should be called during CPU online/offline after
>> the node_states[N_CPU] has been updated.  That is done in
>> CPUHP_AP_ONLINE_DYN during CPU online and in CPUHP_MM_VMSTAT_DEAD
>> during CPU offline.  But in commit 884a6e5d1f93 ("mm/migrate: update
>> node demotion order on hotplug events"), the function to update node
>> demotion order is called in CPUHP_AP_ONLINE_DYN during CPU
>> online/offline.  This doesn't satisfy the order requirement.
>
> What are the user-visible runtime effects of this error?

For example, there are 4 CPUs (P0, P1, P2, P3) in 2 sockets (P0, P1 in
S0 and P2, P3 in S1), the demotion order is

- S0 -> NUMA_NO_NODE
- S1 -> NUMA_NO_NODE

After P2 and P3 is offlined, because S1 has no CPU now, the demotion
order should have been changed to

- S0 -> S1
- S1 -> NO_NODE

but it isn't changed, because the order updating callback for CPU
hotplug doesn't see the new nodemask.  Now, if P1 is offlined, the
demotion order is changed to the expected order as above.

I will update the patch description after adding the above description.

Best Regards,
Huang, Ying

>>  So in
>> this patch, we added CPUHP_AP_MM_DEMOTION_ONLINE and
>> CPUHP_MM_DEMOTION_DEAD to be called after CPUHP_AP_ONLINE_DYN and
>> CPUHP_MM_VMSTAT_DEAD during CPU online and offline, and register the
>> update function on them.
>> 
>> Fixes: 884a6e5d1f93 ("mm/migrate: update node demotion order on hotplug events")
>> Signed-off-by: "Huang, Ying" <ying.huang@...el.com>
>> Cc: Thomas Gleixner <tglx@...utronix.de>
>> Cc: Dave Hansen <dave.hansen@...ux.intel.com>
>> Cc: Yang Shi <shy828301@...il.com>
>> Cc: Zi Yan <ziy@...dia.com>
>> Cc: Michal Hocko <mhocko@...e.com>
>> Cc: Wei Xu <weixugc@...gle.com>
>> Cc: Oscar Salvador <osalvador@...e.de>
>> Cc: David Rientjes <rientjes@...gle.com>
>> Cc: Dan Williams <dan.j.williams@...el.com>
>> Cc: David Hildenbrand <david@...hat.com>
>> Cc: Greg Thelen <gthelen@...gle.com>
>> Cc: Keith Busch <kbusch@...nel.org>
>> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ