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

From: Gregory Price
Date: Mon Mar 24 2025 - 09:44:21 EST


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).

~Gregory