All of lore.kernel.org
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Honggyu Kim <honggyu.kim@sk.com>
Cc: SeongJae Park <sj@kernel.org>,
	damon@lists.linux.dev, kernel_team@skhynix.com,
	Yunjeong Mun <yunjeong.mun@sk.com>
Subject: Re: [PATCH] mm/damon/core: accumulate applied size to quota->charged_sz
Date: Fri, 29 Nov 2024 11:55:29 -0800	[thread overview]
Message-ID: <20241129195529.98532-1-sj@kernel.org> (raw)
In-Reply-To: <20241129083102.1582-1-honggyu.kim@sk.com>

On Fri, 29 Nov 2024 17:31:01 +0900 Honggyu Kim <honggyu.kim@sk.com> wrote:

> While testing DAMOS_MIGRATE_COLD action, Yunjeong found that the
> quota->charged_sz is way less than actually migrated size.

You mean "more", not "less", right?

And, is it a problem for your use case?  Could you please share more details?

> 
> In damos_apply_scheme(), quota->charged_sz is used when checking whether
> the quota exceeds the effective size.  The current implementation
> accumulates the charged_sz with sz(region size), but many pages in the
> region might be discarded by DAMOS filters.
> 
> In order to make the quota calculation more accurate, charged_sz is
> better to be accumulated by the actually applied size, which is
> sz_applied in the code.

This is an intended behavior.  Quota is for making a limit of resource
consumption from DAMOS.  Trying a DAMOS action consumes some of the system
resource even if it was eventually filtered out or failed, so we charge those.

We can consider changes of the behaior depending on problems and use cases, but
it is unclear to me.  Could you please elaborate, as I requested above?


Thanks,
SJ

[...]

  reply	other threads:[~2024-11-29 19:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-29  8:31 [PATCH] mm/damon/core: accumulate applied size to quota->charged_sz Honggyu Kim
2024-11-29 19:55 ` SeongJae Park [this message]
2024-12-02 12:24   ` Honggyu Kim
2024-12-02 17:21     ` 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=20241129195529.98532-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=damon@lists.linux.dev \
    --cc=honggyu.kim@sk.com \
    --cc=kernel_team@skhynix.com \
    --cc=yunjeong.mun@sk.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.