Re: [RFC PATCH 2/4] mm: kpromoted: Hot page info collection and promotion daemon

Bharata B Rao
2025-03-24T14:34:43Z

On 24-Mar-25 7:13 PM, Gregory Price wrote:
> On Thu, Mar 06, 2025 at 11:15:30AM +0530, Bharata B Rao wrote:
>> kpromoted is a kernel daemon that accumulates hot page info
>> from different sources and tries to promote pages from slow
>> tiers to top tiers. One instance of this thread runs on each
>> node that has CPUs.
>>
>
> Hot take: This sounds more like ktieringd not kpromoted

:-)

>
> Is it reasonable to split the tracking a promotion logic into separate
> interfaces? This would let us manage, for example, rate-limiting in the
> movement interface cleanly without having to care about the tiering
> system(s) associated with it.
>
> my_tiering_magic():
> ... identify hot things ...
> promote(batch_folios, optional_data);
> -> kick daemon thread to wake up and do the promotion
> ... continue async things ...
>
> Optional data could be anything from target nodes or accessor info, but
> not hotness information.
>
> Then users at least get a clean interface for things like rate-limiting,
> and everyone proposing their own take on tiering can consume it. This
> may also be useful for existing users (TPP, reclaim?, etc).

Yes, Makes sense to split tracking and promotion logic into separate
parts. There is no need for the promotion part to work with the hot page
list that belongs to the tracking part as I have done in this RFC.

Raghu and I already saw that migration part is kind of duplicated in our
patchsets(kmmscand and this) and were thinking of unifying them. Having
clean separation as you suggest will be good.

Regards,
Bharata.