linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Enze Li <lienze@kylinos.cn>
To: SeongJae Park <sj@kernel.org>
Cc: akpm@linux-foundation.org,  damon@lists.linux.dev,
	 linux-mm@kvack.org, enze.li@gmx.com
Subject: Re: [RFC PATCH 0/2] DAMON: add priority-based scheme application control
Date: Fri, 26 Sep 2025 11:23:33 +0800	[thread overview]
Message-ID: <87bjmxvqve.fsf@> (raw)
In-Reply-To: <20250922130132.59955-1-sj@kernel.org> (SeongJae Park's message of "Mon, 22 Sep 2025 06:01:32 -0700")

Hello SJ,

On Mon, Sep 22 2025 at 06:01:32 AM -0700, SeongJae Park wrote:

> Hello Enze,
>
> On Mon, 22 Sep 2025 18:10:20 +0800 Enze Li <lienze@kylinos.cn> wrote:
>
>> This patchset introduces a priority mechanism for DAMON's scheme
>> application, allowing users to specify the relative importance of
>> monitored processes.  The changes ensure that higher-priority targets
>> receive more frequent memory management operations while maintaining
>> fairness across all monitored processes.
>
> Thank you for this patchset.
>
> There are features for monitoring target-based DAMOS filtering
> (DAMOS_FILTER_TYPE_TARGET) and per-scheme applying time interval
> (apply_interval_us).  Couldn't those be used for your purpose?
>

Sorry for the delay.  I've been testing it for the past few days.

The combination of schemes and filters does indeed emulate a
priority-like mechanism quite effectively.  This is a fantastic feature!
It's exactly what I needed for managing my workload's priorities.

>> 
>> The first patch modifies kdamond_apply_schemes to implement
>> priority-based scheduling, where targets are processed in proportion to
>> their assigned priority values.  For example, a target with priority 50
>> will be serviced 50 times for every 30 times a target with priority 30
>> is processed.
>> 
>> The second patch adds a sysfs interface (priority under each target's
>> directory) to dynamically configure these priorities at runtime. This
>> enables fine-grained control over DAMON's behavior, making it more
>> adaptable to performance-sensitive workloads.
>> 
>> Together, these changes provide better flexibility for users who need
>> differentiated memory management policies across different processes
>> while maintaining backward compatibility with existing setups.
>> 
>> You may want to verify this feature using the following testing
>> procedure:
>> 
>>  # git clone -b v2 https://github.com/lienze/damo.git
>>  # cd damo
>>  # ./damo start --target_pid $(pidof <target1>) --priority 50 \
>>  --target_pid $(pidof <target2>) --priority 30 --damos_action \
>>  pageout --damos_age 5s 5s
>
> So I'm wondering a command like below could be used instead.
>
> $ sudo ./damo args damon \
> 	--target_pid 123 \
> 		--damos_action pageout --damos_age 5s 5s \
> 		--damos_filter allow target 0 --damos_apply_interval 3s \
> 	--target_pid 456 \
> 		--damos_action pageout --damos_age 5s 5s \
> 		--damos_filter allow target 1 --damos_apply_interval 5s \
> 	--damos_nr_filters 1 1
>
>

I've been wondering, though -- for users seeking a simpler interface,
could we allow them to define a basic priority value and let the kernel
handle the resource distribution automatically?  This would require the
DAMON system to intelligently translate a user-defined priority value
into appropriate internal operations based on current system resources.
WDYT?

Best Regards,
Enze

<...>


  reply	other threads:[~2025-09-26  3:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 10:10 Enze Li
2025-09-22 10:10 ` [RFC PATCH 1/2] mm/damon/core: introduce priority concept for DAMON Enze Li
2025-09-22 11:16   ` Gutierrez Asier
2025-09-26  3:57     ` Enze Li
2025-09-22 10:10 ` [RFC PATCH 2/2] mm/damon/sysfs: add priority support for DAMOS targets Enze Li
2025-09-22 13:01 ` [RFC PATCH 0/2] DAMON: add priority-based scheme application control SeongJae Park
2025-09-26  3:23   ` Enze Li [this message]
2025-09-26 17:37     ` SeongJae Park

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=87bjmxvqve.fsf@ \
    --to=lienze@kylinos.cn \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=enze.li@gmx.com \
    --cc=linux-mm@kvack.org \
    --cc=sj@kernel.org \
    /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