public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Honggyu Kim <honggyu.kim@sk.com>
To: "Huang, Ying" <ying.huang@linux.alibaba.com>
Cc: kernel_team@skhynix.com, Joshua Hahn <joshua.hahnjy@gmail.com>,
	gourry@gourry.net, hyeonggon.yoo@sk.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
Subject: Re: [PATCH v3] Weighted interleave auto-tuning
Date: Wed, 5 Feb 2025 14:34:07 +0900	[thread overview]
Message-ID: <92fb15d4-b8fe-4b73-ba2c-2ded3c9bd4ca@sk.com> (raw)
In-Reply-To: <87a5bjiqtk.fsf@DESKTOP-5N7EMDA>

Hi Ying,

On 1/22/2025 10:24 AM, Huang, Ying wrote:

[snip]

>>>> diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-mempolicy-weighted-interleave b/Documentation/ABI/testing/sysfs-kernel-mm-mempolicy-weighted-interleave
>>>> index 0b7972de04e9..d30dc29c53ff 100644
>>>> --- a/Documentation/ABI/testing/sysfs-kernel-mm-mempolicy-weighted-interleave
>>>> +++ b/Documentation/ABI/testing/sysfs-kernel-mm-mempolicy-weighted-interleave
>>>> @@ -20,6 +20,30 @@ Description:	Weight configuration interface for nodeN
>>>>    		Minimum weight: 1
>>>>    		Maximum weight: 255
>>>>    -		Writing an empty string or `0` will reset the weight
>>>> to the
>>>> -		system default. The system default may be set by the kernel
>>>> -		or drivers at boot or during hotplug events.
>>>> +		Writing invalid values (i.e. any values not in [1,255],
>>>> +		empty string, ...) will return -EINVAL.
>>>> +
>>>> +What:		/sys/kernel/mm/mempolicy/weighted_interleave/mode
>>>> +Date:		January 2025
>>>> +Contact:	Linux memory management mailing list <linux-mm@kvack.org>
>>>> +Description:	Auto-weighting configuration interface
>>>> +
>>>> +		Configuration modes for weighted interleave. Can take one of
>>>> +		two options: "manual" and "auto". Default is "auto".
>>>> +
>>>> +		In auto mode, all node weights are re-calculated and overwritten
>>>> +		(visible via the nodeN interfaces) whenever new bandwidth data
>>>> +		is made available either during boot or hotplug events.
>>>> +
>>>> +		In manual mode, node weights can only be updated by the user.
>>>> +		If a node is hotplugged while the user is in manual mode,
>>>> +		the node will have a default weight of 1.
>>>> +
>>>> +		Modes can be changed by writing either "auto" or "manual" to the
>>>> +		interface. All other strings will be ignored, and -EINVAL will
>>>> +		be returned. If "auto" is written to the interface but the
>>>> +		recalculation / updates fail at any point (-ENOMEM or -ENODEV)
>>>> +		then the mode will remain in manual mode.
>>>> +
>>>> +		Writing a new weight to a node directly via the nodeN interface
>>>> +		will also automatically update the system to manual mode.
>>> IMHO, this interface is somewhat hard to be used.  Users need to
>>> know
>>> which value is legal.  So, this will become something like,
>>> $ cat mode
>>> auto [manual]
>>> $ echo auto > mode
>>> $ cat mode
>>> [auto] manual
>>
>> This is exactly I internally proposed to Hyeonggon, but couldn't share
>> the idea directly here.
>>
>>> Unless it's possible we will add more modes in the future, this is
>>> kind
>>> of overkill for me.  How about something simpler as below?
>>> $ cat auto
>>> true
>>> $ echo 0 > auto
>>> $ cat auto
>>> false
>>
>> That also makes sense, but I feel like somewhat vague what "auto" false
>> means. The "auto" might be better to be "use_hmat" instead and this
>> makes "use_hmat" false more meaningful. "use_hmat_weight" or
>> "use_hmat_info" might be another candidates.
> 
> As Gregory pointed out in another email.  hmat isn't good because it's
> platform dependent.  We may use something else to get default weights on
> another platform.

Sorry for the late reply.  I prefered "mode" contains auto/manual and
"hmat" names were my second thought, which may not be proper here as you
mentioned.

> 
> I'm open to other platform independent naming.  For example, use_default.

I'm also fine to your another proposal "auto" with Y/N, which is used in
v4.

> 
> [snip]
> 
> ---
> Best Regards,
> Huang, Ying

Thanks,
Honggyu


  reply	other threads:[~2025-02-05  5:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-15 18:58 [PATCH v3] Weighted interleave auto-tuning Joshua Hahn
2025-01-20  4:47 ` Hyeonggon Yoo
2025-01-21 21:24   ` Joshua Hahn
2025-01-21 11:17 ` Huang, Ying
2025-01-21 11:27   ` Honggyu Kim
2025-01-21 20:02     ` Gregory Price
2025-01-22  1:24     ` Huang, Ying
2025-02-05  5:34       ` Honggyu Kim [this message]
2025-01-21 19:56   ` Gregory Price
2025-01-22  1:37     ` Huang, Ying
2025-01-22 15:59       ` Joshua Hahn
2025-01-22 16:53         ` Gregory Price
2025-01-23  3:32         ` Huang, Ying
2025-01-24  5:58 ` Matthew Wilcox
2025-01-24 15:48   ` Gregory Price
2025-01-24 15:53   ` 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=92fb15d4-b8fe-4b73-ba2c-2ded3c9bd4ca@sk.com \
    --to=honggyu.kim@sk.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=horen.chuang@linux.dev \
    --cc=hyeonggon.yoo@sk.com \
    --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