public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Honggyu Kim <honggyu.kim@sk.com>
To: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: kernel_team@skhynix.com, Gregory Price <gourry@gourry.net>,
	ying.huang@linux.alibaba.com, rafael@kernel.org, lenb@kernel.org,
	gregkh@linuxfoundation.org, akpm@linux-foundation.org,
	rakie.kim@sk.com, dan.j.williams@intel.com,
	Jonathan.Cameron@huawei.com, dave.jiang@intel.com,
	horen.chuang@linux.dev, hannes@cmpxchg.org,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-mm@kvack.org, kernel-team@meta.com, 42.hyeyoo@gmail.com,
	Honggyu Kim <honggyu.km@gmail.com>
Subject: Re: [PATCH v4] Weighted Interleave Auto-tuning
Date: Mon, 3 Feb 2025 21:44:29 +0900	[thread overview]
Message-ID: <a2b428ed-212a-4e39-bcf7-5ab67249132d@sk.com> (raw)
In-Reply-To: <20250202141247.2219681-1-joshua.hahnjy@gmail.com>

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@gmail.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

  reply	other threads:[~2025-02-03 12:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28 22:23 [PATCH v4] Weighted Interleave Auto-tuning Joshua Hahn
2025-01-31 14:23 ` Honggyu Kim
2025-02-01 16:49   ` Gregory Price
2025-02-01 16:53     ` Gregory Price
2025-02-02 13:51       ` Honggyu Kim
2025-02-02 14:12         ` Joshua Hahn
2025-02-03 12:44           ` Honggyu Kim [this message]
2025-02-03 15:38             ` Gregory Price
2025-02-05  2:26               ` Honggyu Kim
2025-02-02 13:44     ` Honggyu Kim
2025-02-04  7:50 ` Harry (Hyeonggon) Yoo
2025-02-04 16:30   ` Gregory Price
2025-02-12 17:27     ` Gregory Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a2b428ed-212a-4e39-bcf7-5ab67249132d@sk.com \
    --to=honggyu.kim@sk.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=gourry@gourry.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=honggyu.km@gmail.com \
    --cc=horen.chuang@linux.dev \
    --cc=joshua.hahnjy@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=kernel_team@skhynix.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rafael@kernel.org \
    --cc=rakie.kim@sk.com \
    --cc=ying.huang@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox