[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z4_782yoMKqIOfW5@gourry-fedora-PF4VCD3F>
Date: Tue, 21 Jan 2025 14:56:35 -0500
From: Gregory Price <gourry@...rry.net>
To: "Huang, Ying" <ying.huang@...ux.alibaba.com>
Cc: Joshua Hahn <joshua.hahnjy@...il.com>, hyeonggon.yoo@...com,
rafael@...nel.org, lenb@...nel.org, gregkh@...uxfoundation.org,
akpm@...ux-foundation.org, honggyu.kim@...com, 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
Subject: Re: [PATCH v3] Weighted interleave auto-tuning
On Tue, Jan 21, 2025 at 07:17:15PM +0800, Huang, Ying wrote:
... snip ...
>
> 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
We have discussed having a dynamic-mode where the weights might adjust
on the fly based on system-state, but i think this ends up being
controlled under mempolicy/dynamic_interleave or something.
So this seems reasonable.
> > static u8 __rcu *iw_table;
> > static DEFINE_MUTEX(iw_table_lock);
> > +static const int weightiness = 32;
> > +static bool weighted_interleave_auto = true;
>
> I still prefer to use 2 iw_table, one is for default, the other is for
> manual. The default one will be used if the manual one is NULL. Both
> are protected by RCU. The default one can be updated upon hotplug
> blindly. This makes the whole model easier to be understood IMHO.
>
> What do you think about that.
>
only question is, lets say you have
`cat auto node0 node1` -> `true 5 1`
and you do
echo 0 > auto
what should a subsequent `cat auto node0 node1` output?
`false 5 1`
or
`false 1 1`
Then lets say we do
echo 7 > node0
what should
echo true > auto
result in?
`true 5 1`
or
`true 7 1`
The current code makes sure that when you switch modes from auto
to manual, it inherits the current state - instead of there being
some hidden state that suddenly takes precedence.
So I prefer to just have one IW array and no hidden state.
~Gregory
Powered by blists - more mailing lists