public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mm/damon/core: small cleanups
@ 2026-03-25  7:37 Josh Law
  2026-03-25  7:37 ` [PATCH 1/3] mm/damon/core: deduplicate scheme index lookup into helper Josh Law
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Josh Law @ 2026-03-25  7:37 UTC (permalink / raw)
  To: SeongJae Park, Andrew Morton; +Cc: damon, linux-mm, linux-kernel, Josh Law

Three small cleanups for mm/damon/core.c:

1. Extract duplicated scheme-index-finding loops into a helper.

2. Use the already-maintained damon_nr_regions() instead of walking the
   region list to count in damon_commit_target_regions().

3. Move the static last_nr_regions variable in kdamond_split_regions()
   into struct damon_ctx so each kdamond tracks its own state.

Josh Law (3):
  mm/damon/core: deduplicate scheme index lookup into helper
  mm/damon/core: use damon_nr_regions() in damon_commit_target_regions()
  mm/damon/core: move last_nr_regions from static local to damon_ctx

 include/linux/damon.h |  2 ++
 mm/damon/core.c       | 54 ++++++++++++++++++-------------------------
 2 files changed, 24 insertions(+), 32 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-25 16:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25  7:37 [PATCH 0/3] mm/damon/core: small cleanups Josh Law
2026-03-25  7:37 ` [PATCH 1/3] mm/damon/core: deduplicate scheme index lookup into helper Josh Law
2026-03-25  7:37 ` [PATCH 2/3] mm/damon/core: use damon_nr_regions() in damon_commit_target_regions() Josh Law
2026-03-25  7:38 ` [PATCH 3/3] mm/damon/core: move last_nr_regions from static local to damon_ctx Josh Law
2026-03-25 14:58 ` (sashiko status) [PATCH 0/3] mm/damon/core: small cleanups SeongJae Park
2026-03-25 15:44   ` Josh Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox