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: <a2b428ed-212a-4e39-bcf7-5ab67249132d@sk.com>
Date: Mon, 3 Feb 2025 21:44:29 +0900
From: Honggyu Kim <honggyu.kim@...com>
To: Joshua Hahn <joshua.hahnjy@...il.com>
Cc: kernel_team@...ynix.com, Gregory Price <gourry@...rry.net>,
 ying.huang@...ux.alibaba.com, rafael@...nel.org, lenb@...nel.org,
 gregkh@...uxfoundation.org, akpm@...ux-foundation.org, rakie.kim@...com,
 dan.j.williams@...el.com, Jonathan.Cameron@...wei.com, dave.jiang@...el.com,
 horen.chuang@...ux.dev, hannes@...xchg.org, linux-kernel@...r.kernel.org,
 linux-acpi@...r.kernel.org, linux-mm@...ck.org, kernel-team@...a.com,
 42.hyeyoo@...il.com, Honggyu Kim <honggyu.km@...il.com>
Subject: Re: [PATCH v4] Weighted Interleave Auto-tuning

Hi Joshua,

On 2/2/2025 11:12 PM, Joshua Hahn wrote:
> Hi Honggyu,
> 
> On Sun, 2 Feb 2025 22:51:34 +0900 Honggyu Kim <honggyu.km@...il.com> wrote:
> 
>> On 2/2/25 01:53, Gregory Price wrote:
>>> On Sat, Feb 01, 2025 at 11:49:31AM -0500, Gregory Price wrote:
>>>>>     1. the auto mode set the weights as 10:5:1 for node{0-2}.
>>>>>     2. node2 is offlined, then recalculation makes it as 2:1 for node{0,1}.
>>>
>>> Point of clarification here:  a hot-unplug event won't cause
>>> recalculation.
>>>
>>> What actually causes re-weight is hot-plug reporting new capacity.
>>
>> So do you mean re-weight is done only when a new node is onlined while
>> offline doesn't trigger re-weight?
>>
>> I see node_set_perf_attrs() does recalculation by calling
>> mempolicy_set_node_perf(), then reduce_interleave_weights().
>>
>> But I'm not sure if the re-weight is done via node_set_perf_attrs() only
>> when a new node is onlined.
>>
>> Could you please explain where I can find it?
> 
> Just chiming in to add some clarification:
> Your analysis above is correct; reduce_interleave_weights() is only
> called in 2 spots: once when the mode is switched from manual --> auto,
> and the other when new bandwidth data is available, which calls
> node_set_perf_attrs() and so on. In all other scenarios, iw_table is
> preserved, and all values inside remain the same without manual changes.

Yeah, this part is clear.

> A node offlining (or even onlining with no new bandwidth information)
> will just mean that the node inherits whatever value is stored in
> iw_table at that moment, whether that contains the default values
> created on init or the last values that it had taken.

It looks the call sequence is as follows.

   cxl_region_perf_attrs_callback()
   -> cxl_region_update_coordinates()
   -> node_set_perf_attrs()
   -> mempolicy_set_node_perf()
   -> reduce_interleave_weights()

I haven't searched all the paths of cxl_region_perf_attrs_callback() via
cxlr->memory_notifier.notifier_call callback pointer, but maybe this
function is not called when a node is offlined, then I get node
offlining doesn't trigger re-weight calculation.

By the way, do you test it using CXL hardware or using qemu?

> 
>>> So in this scenario, the weight will remain the same for node2.
>>
>> If it's true, my scenario is wrong.
>>
>> Thanks,
>> Honggyu
>>
>>>
>>>>>     3. the auto sysfs interface is set to 0 to make it manual mode.
> 
> Please let me know if this makes sense. Thank you for your review
> as always, and have a great day!
> Joshua

Thanks for your response.  Have a great day you too!

Regards,
Honggyu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ