Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Liew Rui Yan <aethernet65535@gmail.com>
To: sj@kernel.org
Cc: aethernet65535@gmail.com, damon@lists.linux.dev, linux-mm@kvack.org
Subject: Re: [RFC/Discussion] mm/damon: Implementation for paused kdamond
Date: Thu, 17 Sep 2026 23:31:53 +0800	[thread overview]
Message-ID: <20260917153238.76020-1-aethernet65535@gmail.com> (raw)
In-Reply-To: <20260915002836.101895-1-sj@kernel.org>

On Mon, 14 Sep 2026 17:28:35 -0700 SJ Park <sj@kernel.org> wrote:

> On Mon, 14 Sep 2026 23:35:10 +0800 Liew Rui Yan <aethernet65535@gmail.com> wrote:
> 
> > Hi SJ,
> > 
> > I noticed that the current implementation for paused kdamond is
> > periodically applies online parameter updates by kdamond_usleep().
> > 
> > I'd like to know if we should change it to waitqueue to achieve a lower
> > power consumption?
> 
> I'd like to make a data driven decision :)
> 
> > 
> > Previous Discussion
> > ===================
> > 
> > I noticed that when you introduced ctx->pause [1], Sashiko asked the
> > same question, and your response at the time was:
> > 
> >     "sample internval is 5ms by default and recommended auto-tuning
> >     setup makes it hundreds of milliseconds.  So I don't think such
> >     change is required."
> > 
> > I'm curious that, did you think it wasn't neccessary to change it to
> > waitqueue when it was introduced, or it wasn't neccessary to do so even
> > after it had been introduced?
> 
> I guess I thought so when the quiestion is raised.
> 
> > 
> > Asussmption
> > ===========
> > 
> > This is just my assumption, not a real use case I knew:  When 'pause' is
> > set on an Android device, user might want DAMON to stop running
> > completely when the screen is off, thereby reducing the load on the CPU
> > without losing important information such as regions and age.
> > 
> > The current polling may make it harder for the phone to enter idle mode,
> > resulting in some unnecessary power consumption.
> > 
> > However, pause feature is only present in the stable version v7.2 or
> > higher, and since the latest Android kernel is 6.18, this highly
> > unlikely will affect any Android users.
> 
> If whoever comes with a data that require changes, we can discuss.

Thank you for your clarify.

I recently backported the pause feature to my phone.  However, due to
Android's screen-off mechanisms, I wasn't able to obtain any valid data
during testing.

Since we haven't identified any practical issues with the existing pause
feature, switching to waitqueue isn't neccessary at this time.

Regarding the documentation, should we explicitly explain the
relationship between 'pause' and sample_interval in the documentation?
That way, users can adjust the sample_interval value when using pause
feature based on their specific use case.

> 
> > 
> > [1] https://lore.kernel.org/damon/20260321202858.98091-1-sj@kernel.org

Best regards,
Rui Yan


  reply	other threads:[~2026-09-17 15:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 15:35 [RFC/Discussion] mm/damon: Implementation for paused kdamond Liew Rui Yan
2026-09-15  0:28 ` SJ Park
2026-09-17 15:31   ` Liew Rui Yan [this message]
2026-09-18  2:45     ` SeongJae Park
2026-09-19  7:53       ` Liew Rui Yan

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=20260917153238.76020-1-aethernet65535@gmail.com \
    --to=aethernet65535@gmail.com \
    --cc=damon@lists.linux.dev \
    --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