Re: [PATCH v6 01/13] mm/demotion: Add support for explicit memory tiers

From: Aneesh Kumar K V
Date: Mon Jun 13 2022 - 13:48:09 EST


On 6/13/22 6:46 PM, Johannes Weiner wrote:
On Mon, Jun 13, 2022 at 01:30:08PM +0800, Ying Huang wrote:
On Mon, 2022-06-13 at 09:01 +0530, Aneesh Kumar K V wrote:
On 6/13/22 8:52 AM, Ying Huang wrote:
On Fri, 2022-06-10 at 19:22 +0530, Aneesh Kumar K.V wrote:
+config TIERED_MEMORY
+ def_bool NUMA
+

As Yang pointed out, why not just use CONFIG_NUMA? I suspect the
added value of CONIFIG_TIRED_MEMORY.

I decided to use TIERED_MEMORY to bring more clarity. It should be same
now that we have moved CONFIG_MIGRATION dependencies to runtime. IMHO
having CONFIG_TIERED_MEMORY is better than using CONFIG_NUMA.

I don't think CONFIG_TIERED_MEMORY bring no much value. It's better
to use CONFIG_NUMA directly. But this is just my opinion.

I agree. As long as it's always built with CONFIG_NUMA, it's simply
NUMA code. Easy enough to modularize it later if somebody really wants
this to be configurable separately.

I was comparing,

#ifdef CONFIG_TIERED_MEMORY
struct memory_tier {

vs

#ifdef CONFIG_NUMA
struct memory_tier {

I will switch to CONFIG_NUMA in the next update since you are not finding it beneficial.

-aneesh