Re: [PATCH resend] memcg: introduce per-memcg reclaim interface
From: Tim Chen
Date: Thu Apr 07 2022 - 19:11:47 EST
On Thu, 2022-04-07 at 15:12 -0700, Wei Xu wrote:
>
> (resending in plain-text, sorry).
>
> memory.demote can work with any level of memory tiers if a nodemask
> argument (or a tier argument if there is a more-explicitly defined,
> userspace visible tiering representation) is provided. The semantics
> can be to demote X bytes from these nodes to their next tier.
>
We do need some kind of userspace visible tiering representation.
Will be nice if I can tell the memory type, nodemask of nodes in tier Y with
cat memory.tier_Y
> memory_dram/memory_pmem assumes the hardware for a particular memory
> tier, which is undesirable. For example, it is entirely possible that
> a slow memory tier is implemented by a lower-cost/lower-performance
> DDR device connected via CXL.mem, not by PMEM. It is better for this
> interface to speak in either the NUMA node abstraction or a new tier
> abstraction.
Just from the perspective of memory.reclaim and memory.demote, I think
they could work with nodemask. For ease of management,
some kind of abstraction of tier information like nodemask, memory type
and expected performance should be readily accessible by user space.
Tim
>
> It is also desirable to make this interface stateless, i.e. not to
> require the setting of memory_dram.reclaim_policy. Any policy can be
> specified as arguments to the request itself and should only affect
> that particular request.
>
> Wei