linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Simon Wang (王传国)" <wangchuanguo@inspur.com>
To: SeongJae Park <sj@kernel.org>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
	"david@redhat.com" <david@redhat.com>,
	"mhocko@kernel.org" <mhocko@kernel.org>,
	"zhengqi.arch@bytedance.com" <zhengqi.arch@bytedance.com>,
	"shakeel.butt@linux.dev" <shakeel.butt@linux.dev>,
	"lorenzo.stoakes@oracle.com" <lorenzo.stoakes@oracle.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"damon@lists.linux.dev" <damon@lists.linux.dev>
Subject: Re: [PATCH 2/2] mm/damon/sysfs-schemes: add use_nodes_of_tier on sysfs-schemes
Date: Thu, 29 May 2025 03:12:13 +0000	[thread overview]
Message-ID: <a3f041d817534652a3e1e6545432016b@inspur.com> (raw)

> > This patch adds use_nodes_of_tier under
> >
> /sys/kernel/mm/damon/admin/kdamonds/<N>/contexts/<N>/schemes/<N>/
> >
> > The 'use_nodes_of_tier' can be used to select nodes within the same
> > memory tier of target_nid for DAMOS actions such as
> DAMOS_MIGRATE_{HOT,COLD}.
> 
> Could you please elaborate in what setup you think this option is useful, and
> measurement of the usefulness if you have?
> 
> I'm asking the above question because of below reasons.  My anticiapted
> usage of DAMOS_MIGRATE_{HOT,COLD} is for not only memory tiering but
> generic NUMA node management.  And my proposed usage of these for
> memory tiering is making per-node promotion/demotion for gradually
> promoting and demoting pages step by step between node.  It could be slow
> but I anticipate such slow but continued promotion/demotion is more
> important for reliable performance on production systems of large time scale.
> And I believe the approach can be applied to general NUMA nodes
> management, once DAMON is extended for per-CPU access monitoring.
> 
> I'm not saying this change is not useful, but asking you to give me a chance to
> learn your changes, better.

I believe some users may want to ​​use only the target node's memory​​ and reserve other nodes in the same tier for specific applications. Therefore, I added a switch file use_nodes_of_tier. I think it might be better to set the default value of use_nodes_of_tier to true (i.e., allow using fallback nodes). What do you think

> >
> > Signed-off-by: wangchuanguo <wangchuanguo@inspur.com>
> > ---
> >  include/linux/damon.h        |  9 ++++++++-
> >  include/linux/memory-tiers.h |  5 +++++
> >  mm/damon/core.c              |  6 ++++--
> >  mm/damon/lru_sort.c          |  3 ++-
> >  mm/damon/paddr.c             | 19 ++++++++++++-------
> >  mm/damon/reclaim.c           |  3 ++-
> >  mm/damon/sysfs-schemes.c     | 31
> ++++++++++++++++++++++++++++++-
> >  mm/memory-tiers.c            | 13 +++++++++++++
> >  samples/damon/mtier.c        |  3 ++-
> >  samples/damon/prcl.c         |  3 ++-
> >  10 files changed, 80 insertions(+), 15 deletions(-)
> 
> Can we please make this change more separated?  Maybe we can split the
> change for memory-tiers.c, DAMON core layer, and DAMON sysfs interface.
> That will make review much easier.

Yes,I'll split this patch to be 2 patches.


> I'll add more comments for details after above high level discussion is done.
> 
> 
> Thanks,
> SJ
> 
> [...]

             reply	other threads:[~2025-05-29  3:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-29  3:12 Simon Wang (王传国) [this message]
2025-05-29 16:46 ` SeongJae Park
  -- strict thread matches above, loose matches on Subject: below --
2025-05-30  8:04 Simon Wang (王传国)
2025-05-30 19:40 ` SeongJae Park
2025-06-03  3:05   ` wangchuanguo
2025-06-05 18:20   ` SeongJae Park
2025-06-09 12:39   ` Honggyu Kim
2025-06-09 19:13     ` SeongJae Park
2025-05-28 11:10 [PATCH 0/2] add a knob to control whether to use other nodes at the same tier of the target node in DAMON wangchuanguo
2025-05-28 11:10 ` [PATCH 2/2] mm/damon/sysfs-schemes: add use_nodes_of_tier on sysfs-schemes wangchuanguo
2025-05-28 21:33   ` kernel test robot
2025-05-28 22:31   ` SeongJae Park
2025-06-09 12:30   ` Honggyu Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3f041d817534652a3e1e6545432016b@inspur.com \
    --to=wangchuanguo@inspur.com \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mhocko@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=sj@kernel.org \
    --cc=zhengqi.arch@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox