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: <4bfa007c-a20f-9e68-4a9f-935dacf43222@bytedance.com>
Date:   Fri, 20 Oct 2023 15:35:08 +0800
From:   Qi Zheng <zhengqi.arch@...edance.com>
To:     "Huang, Ying" <ying.huang@...el.com>
Cc:     akpm@...ux-foundation.org, rppt@...nel.org, david@...hat.com,
        vbabka@...e.cz, mhocko@...e.com, willy@...radead.org,
        mgorman@...hsingularity.net, mingo@...nel.org,
        aneesh.kumar@...ux.ibm.com, hannes@...xchg.org, osalvador@...e.de,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v3 2/2] mm: memory_hotplug: drop memoryless node from
 fallback lists

Hi Ying,

On 2023/10/20 15:05, Huang, Ying wrote:
> Qi Zheng <zhengqi.arch@...edance.com> writes:
> 
>> In offline_pages(), if a node becomes memoryless, we
>> will clear its N_MEMORY state by calling node_states_clear_node().
>> But we do this after rebuilding the zonelists by calling
>> build_all_zonelists(), which will cause this memoryless node to
>> still be in the fallback list of other nodes.
> 
> For fallback list, do you mean pgdat->node_zonelists[]?  If so, in
> 
> build_all_zonelists
>    __build_all_zonelists
>      build_zonelists
>        build_zonelists_in_node_order
>          build_zonerefs_node
> 
> populated_zone() will be checked before adding zone into zonelist.
> 
> So, IIUC, we will not try to allocate from the memory less node.

Normally yes, but if it is the weird topology mentioned in [1], it's
possible to allocate memory from it, it is a memoryless node, but it
also has memory.

In addition to the above case, I think it's reasonable to remove
memory less node from node_order[] in advance. In this way it will
not to be traversed in build_zonelists_in_node_order().

[1]. 
https://lore.kernel.org/all/20230212110305.93670-1-zhengqi.arch@bytedance.com/

Thanks,
Qi


> 
> --
> Best Regards,
> Huang, Ying
> 
> 
>> This will incur
>> some runtime overhead.
>>
>> To drop memoryless node from fallback lists in this case, just
>> call node_states_clear_node() before calling build_all_zonelists().
>>
>> Signed-off-by: Qi Zheng <zhengqi.arch@...edance.com>
>> Acked-by: David Hildenbrand <david@...hat.com>
> 
> [snip]
> 
> --
> Best Regards,
> Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ