damon.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: SeongJae Park <sj@kernel.org>, Shuah Khan <shuah@kernel.org>,
	damon@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH 0/4] mm/damon/reclaim,lru_sort: enable/disable synchronously
Date: Tue, 25 Oct 2022 17:36:46 +0000	[thread overview]
Message-ID: <20221025173650.90624-1-sj@kernel.org> (raw)

Writing a value to DAMON_RECLAIM and DAMON_LRU_SORT's 'enabled'
parameters turns on or off DAMON in an ansychronous way.  This means the
parameter cannot be used to read the current status of them.
'kdamond_pid' parameter should be used instead for the purpose.  The
documentation is easy to be read as it works in a synchronous way, so it
is a little bit confusing.  It also makes the user space tooling dirty.

There's no real reason to have the asynchronous behavior, though.
Simply make the parameter works synchronously, rather than updating the
document.

The first and second patches changes the behavior of the 'enabled'
parameter for DAMON_RECLAIM and adds a selftest for the changed
behavior, respectively.  Following two patches make the same changes for
DAMON_LRU_SORT.

SeongJae Park (4):
  mm/damon/reclaim: enable and disable synchronously
  selftests/damon: add tests for DAMON_RECLAIM's enabled parameter
  mm/damon/lru_sort: enable and disable synchronously
  selftests/damon: add tests for DAMON_LRU_SORT's enabled parameter

 mm/damon/lru_sort.c                       | 51 ++++++++++------------
 mm/damon/reclaim.c                        | 53 ++++++++++-------------
 tools/testing/selftests/damon/Makefile    |  1 +
 tools/testing/selftests/damon/lru_sort.sh | 41 ++++++++++++++++++
 tools/testing/selftests/damon/reclaim.sh  | 42 ++++++++++++++++++
 5 files changed, 129 insertions(+), 59 deletions(-)
 create mode 100755 tools/testing/selftests/damon/lru_sort.sh
 create mode 100755 tools/testing/selftests/damon/reclaim.sh

-- 
2.25.1


             reply	other threads:[~2022-10-25 17:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 17:36 SeongJae Park [this message]
2022-10-25 17:36 ` [PATCH 1/4] mm/damon/reclaim: enable and disable synchronously SeongJae Park
2022-10-25 17:36 ` [PATCH 2/4] selftests/damon: add tests for DAMON_RECLAIM's enabled parameter SeongJae Park
2022-10-25 17:36 ` [PATCH 3/4] mm/damon/lru_sort: enable and disable synchronously SeongJae Park
2022-10-25 17:36 ` [PATCH 4/4] selftests/damon: add tests for DAMON_LRU_SORT's enabled parameter 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=20221025173650.90624-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shuah@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;
as well as URLs for NNTP newsgroup(s).