[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87jzbtr315.fsf@DESKTOP-5N7EMDA>
Date: Sat, 21 Dec 2024 13:57:58 +0800
From: "Huang, Ying" <ying.huang@...ux.alibaba.com>
To: Joshua Hahn <joshua.hahnjy@...il.com>
Cc: hyeonggon.yoo@...com, "gourry@...rry.net" <gourry@...rry.net>,
kernel_team@...ynix.com, "rafael@...nel.org" <rafael@...nel.org>,
"lenb@...nel.org" <lenb@...nel.org>, "gregkh@...uxfoundation.org"
<gregkh@...uxfoundation.org>, "akpm@...ux-foundation.org"
<akpm@...ux-foundation.org>, 김홍규(KIM HONGGYU) System SW
<honggyu.kim@...com>, 김락기(KIM RAKIE) System SW <rakie.kim@...com>,
"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
"Jonathan.Cameron@...wei.com" <Jonathan.Cameron@...wei.com>,
"dave.jiang@...el.com" <dave.jiang@...el.com>, "horen.chuang@...ux.dev"
<horen.chuang@...ux.dev>, "hannes@...xchg.org" <hannes@...xchg.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>, "kernel-team@...a.com"
<kernel-team@...a.com>
Subject: Re: [External Mail] [RFC PATCH] mm/mempolicy: Weighted interleave
auto-tuning
Hi, Joshua,
Joshua Hahn <joshua.hahnjy@...il.com> writes:
> On Fri, 13 Dec 2024 15:19:20 +0900 Hyeonggon Yoo <hyeonggon.yoo@...com> wrote:
>
>> On 2024-12-11 06:54 AM, Joshua Hahn wrote:
[snip]
>
> [-----8<-----]
>
>> > +What: /sys/kernel/mm/mempolicy/weighted_interleave/max_node_weight
I don't think that we need a new knob for this. Just use a reasonable
default value, for example, 32 or 16. If it turns out that a knob will
be really helpful, we can add it at that time. For now, I don't think
the requirements are clear. And, this is a new ABI and we need to
maintain it almost for ever. We must be careful about new knob.
>> > +Date: December 2024
>> > +Contact: Linux memory management mailing list <linux-mm@...ck.org>
>> > +Description: Weight limiting / scaling interface
>> > +
>> > + The maximum interleave weight for a memory node. When it is
>> > + updated, any previous changes to interleave weights (i.e. via
>> > + the nodeN sysfs interfaces) are ignored, and new weights are
>> > + calculated using ACPI-reported bandwidths and scaled.
>> > +
>>
>> At first this paragraph sounded like "previously stored weights are
>> discarded after setting max_node_weight", but I think you mean
>> "User can override the default values, but defaults values are
>> calculated regardless of the values set by the user". Right?
>
> In the implementation, the first way you interpreted is the correct
> description. That is, if a user manually changes a ndoe weight,
> then updates the max_node_weight, the previous manual change will
> be overwritten by the newly scaled values.
>
> Does this behavior make sense? Perhaps it makes sense to ignore
> user-changed values when doing the re-scaling if a user decides to
> change the max_node_weight value themselves.
>
> Regardless of what implementation makes sense, I can re-write the
> description so that there is no ambiguity when it comes to the
> expected behavior of the code. Thank you for pointing this out!
I don't think that it's a good idea to override the user supplied
configuration values. User configurations always have higher priority
than system default configurations. IIUC, this is the general rule of
Linux kernel user space interface.
---
Best Regards,
Huang, Ying
Powered by blists - more mailing lists