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>,
	Brendan Higgins <brendanhiggins@google.com>,
	damon@lists.linux.dev, linux-mm@kvack.org,
	kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] mm/damon/sysfs: fix unexpected targets adding bug
Date: Sun, 22 Oct 2023 21:07:32 +0000	[thread overview]
Message-ID: <20231022210735.46409-1-sj@kernel.org> (raw)

The sysfs code for online targets updating can result in adding more than
expected monigoring targets to the context.  It can result in unexpected amount
of memory consumption and monitoring overhead.  This patchset fixes the issue
(patch 1), and add a kunit test for avoiding similar bug of future (patch 2).

SeongJae Park (2):
  mm/damon/sysfs: remove requested targets when online-commit inputs
  mm/damon/sysfs-test: add a unit test for damon_sysfs_set_targets()

 mm/damon/Kconfig      | 12 ++++++
 mm/damon/sysfs-test.h | 86 +++++++++++++++++++++++++++++++++++++++++++
 mm/damon/sysfs.c      | 52 ++++++--------------------
 3 files changed, 109 insertions(+), 41 deletions(-)
 create mode 100644 mm/damon/sysfs-test.h


base-commit: 9a969da6ffb9609f5fa8d0b7fdc6859c37a10335
-- 
2.34.1


             reply	other threads:[~2023-10-22 21:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-22 21:07 SeongJae Park [this message]
2023-10-22 21:07 ` [PATCH 1/2] mm/damon/sysfs: remove requested targets when online-commit inputs SeongJae Park
2023-10-28 21:09   ` SeongJae Park
2023-10-22 21:07 ` [PATCH 2/2] mm/damon/sysfs-test: add a unit test for damon_sysfs_set_targets() 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=20231022210735.46409-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=brendanhiggins@google.com \
    --cc=damon@lists.linux.dev \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.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 read-only IMAP folder(s) and NNTP newsgroup(s).