Linux Documentation
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Maksym Shcherba <mshcherba2000@gmail.com>
Cc: SeongJae Park <sj@kernel.org>,
	Maksym Shcherba <maksym.shcherba@lnu.edu.ua>,
	akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org,
	liam@infradead.org, vbabka@kernel.org, rppt@kernel.org,
	surenb@google.com, mhocko@suse.com, corbet@lwn.net,
	skhan@linuxfoundation.org, damon@lists.linux.dev,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 2/6] mm/damon/sysfs: implement update_schemes_quota_goals command
Date: Tue, 19 May 2026 08:08:21 -0700	[thread overview]
Message-ID: <20260519150822.92326-1-sj@kernel.org> (raw)
In-Reply-To: <20260519073352.16587-1-maksym.shcherba@lnu.edu.ua>

On Tue, 19 May 2026 10:33:52 +0300 Maksym Shcherba <mshcherba2000@gmail.com> wrote:

> On Mon, 18 May 2026 17:17:02 -0700 SeongJae Park <sj@kernel.org> wrote:
> 
> > On Mon, 18 May 2026 22:09:28 +0300 Maksym Shcherba <mshcherba2000@gmail.com> wrote:
> > 
> > > Add the logic to copy the current_value from the internal
> > > damos_quota_goal structure to the damos_sysfs_quota_goal sysfs structure.
> > > Introduce the DAMON_SYSFS_CMD_UPDATE_SCHEMES_QUOTA_GOALS command
> > > and integrate it with the sysfs interface via the 'state' file.
> > 
> > Could you please further elaborate why you think this change is needed?  What
> > is the expected use case and benefit?
> >
> 
> Hi SJ,
> 
> The documentation (`Documentation/admin-guide/mm/damon/usage.rst`)
> states that users can read the `current_value` file. However, the
> kernel currently never updates this value in sysfs, preventing users
> from reading the actual metrics.
> 
> This patch series implements the missing logic to align the code
> with the documentation.

Thank you for clarifying, Maksym.

> 
> If the design intent was to intentionally keep `current_value`
> internal and not expose it via sysfs, then the documentation is
> incorrect. Let me know if that's the case, and I will send a v2
> that drops the code changes and only fixes the documentation.

Yes, the documentation is incorrect.  It was written in the way due to
following history.  The DAMOS quota auto-tuning feature was initially developed
with oly 'user_input' target metric type.  In the case, 'current_value' is set
by users.  Hence reading the file was returning the last user-input value.
That is, as the documentation is also saying, it is returning the 'parameter'
(user input) value.  It is not designed for exposing the internal state.

Later we extended the feature to let DAMOS self-fetch the current value.  The
fact that the ``current_value`` is for reading and writing the parameter (user
input) value, and therefore reading it doesn't return the internal set value,
should be further clarified, but I forgot doing that.

So, yes, if the current behavior is not making problem, let's update the
documentation.  I'll wait for your v2 :)

> 
> (Apologies for missing the cover letter where this should have
> been explained, this is my first patch submission).

No worries, we continuously mistake and learn from each other in the
DAMON/mm/linux community!  Welcome to the community, and I'm looking forward to
your v2!


Thanks,
SJ

[...]

  reply	other threads:[~2026-05-19 15:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18 19:09 [PATCH 1/6] mm/damon: fix missing parens in macro arguments Maksym Shcherba
2026-05-18 19:09 ` [PATCH 2/6] mm/damon/sysfs: implement update_schemes_quota_goals command Maksym Shcherba
2026-05-19  0:17   ` SeongJae Park
2026-05-19  7:33     ` Maksym Shcherba
2026-05-19 15:08       ` SeongJae Park [this message]
2026-05-18 19:09 ` [PATCH 3/6] Docs/ABI/damon: document " Maksym Shcherba
2026-05-18 19:09 ` [PATCH 4/6] Docs/admin-guide/mm/damon/usage: document update_schemes_quota_goals sysfs command Maksym Shcherba
2026-05-18 19:09 ` [PATCH 5/6] selftests/damon/_damon_sysfs: support update_schemes_quota_goals Maksym Shcherba
2026-05-18 19:09 ` [PATCH 6/6] selftests/damon: add a test for update_schemes_quota_goals Maksym Shcherba
2026-05-19  0:10 ` [PATCH 1/6] mm/damon: fix missing parens in macro arguments 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=20260519150822.92326-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=damon@lists.linux.dev \
    --cc=david@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=maksym.shcherba@lnu.edu.ua \
    --cc=mhocko@suse.com \
    --cc=mshcherba2000@gmail.com \
    --cc=rppt@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=surenb@google.com \
    --cc=vbabka@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