Re: [PATCH v5 1/9] mm/demotion: Add support for explicit memory tiers
From: Aneesh Kumar K V
Date: Thu Jun 16 2022 - 00:51:02 EST
On 6/16/22 9:15 AM, Wei Xu wrote:
> On Wed, Jun 15, 2022 at 6:11 PM Ying Huang <ying.huang@xxxxxxxxx> wrote:
>>
>> On Tue, 2022-06-14 at 14:56 -0400, Johannes Weiner wrote:
>>> On Tue, Jun 14, 2022 at 01:31:37PM +0530, Aneesh Kumar K V wrote:
....
>> As Jonathan Cameron pointed, we may need the memory tier ID to be
>> stable if possible. I know this isn't a easy task. At least we can
>> make the default memory tier (CPU local DRAM) ID stable (for example
>> make it always 128)? That provides an anchor for users to understand.
>
> One of the motivations of introducing "rank" is to allow memory tier
> ID to be stable, at least for the well-defined tiers such as the
> default memory tier. The default memory tier can be moved around in
> the tier hierarchy by adjusting its rank position relative to other
> tiers, but its device ID can remain the same, e.g. always 1.
>
With /sys/devices/system/memtier/default_tier userspace will be able query
the default tier details. Did you get to look at
https://lore.kernel.org/linux-mm/7b72ccf4-f4ae-cb4e-f411-74d055482026@xxxxxxxxxxxxx
Any reason why that will not work with all the requirements we had?
-aneesh