linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] mm/damon: cleanup and refactoring code
@ 2022-10-24 20:49 SeongJae Park
  2022-10-24 20:49 ` [PATCH 01/11] mm/damon/core: split out DAMOS-charged region skip logic into a new function SeongJae Park
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: SeongJae Park @ 2022-10-24 20:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: SeongJae Park, damon, linux-kernel, linux-mm

This patchset cleans up and refactors a range of DAMON code including
the core, DAMON sysfs interface, and DAMON modules, for better
readability and convenient future feature implementations.

In detail, this patchset splits unnecessarily long and complex functions
in core into smaller functions (patches 1-4).  Then, it cleans up the
DAMON sysfs interface by using more type-safe code (patch 5) and
removing unnecessary function parameters (patch 6).  Further, it
refactor the code by distributing the code into multiple files (patches
7-9).  Last two patches (patches 10 and 11) deduplicates and remove
unnecessary header inclusion in DAMON modules (reclaim and lru_sort).

Note that this initially posted as a part of a feature implementation
RFC patchset[1], but separated into this patchset as the amount of the
change is not small compared to the feature implementation change
itself.

[1] https://lore.kernel.org/damon/20221019001317.104270-1-sj@kernel.org/

SeongJae Park (11):
  mm/damon/core: split out DAMOS-charged region skip logic into a new
    function
  mm/damon/core: split damos application logic into a new function
  mm/damon/core: split out scheme stat update logic into a new function
  mm/damon/core: split out scheme quota adjustment logic into a new
    function
  mm/damon/sysfs: use damon_addr_range for regions' start and end values
  mm/damon/sysfs: remove parameters of damon_sysfs_region_alloc()
  mm/damon/sysfs: move sysfs_lock to common module
  mm/damon/sysfs: move unsigned long range directory to common module
  mm/damon/sysfs: split out kdamond-independent schemes stats update
    logic into a new function
  mm/damon/modules: deduplicate init steps for DAMON context setup
  mm/damon/{reclaim,lru_sort}: remove unnecessarily included headers

 mm/damon/Makefile         |   6 +-
 mm/damon/core.c           | 262 +++++++++++++++++++++++---------------
 mm/damon/lru_sort.c       |  19 +--
 mm/damon/modules-common.c |  42 ++++++
 mm/damon/modules-common.h |   3 +
 mm/damon/reclaim.c        |  19 +--
 mm/damon/sysfs-common.c   | 107 ++++++++++++++++
 mm/damon/sysfs-common.h   |  24 ++++
 mm/damon/sysfs.c          | 172 +++++--------------------
 9 files changed, 374 insertions(+), 280 deletions(-)
 create mode 100644 mm/damon/modules-common.c
 create mode 100644 mm/damon/sysfs-common.c
 create mode 100644 mm/damon/sysfs-common.h

-- 
2.25.1



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

end of thread, other threads:[~2022-10-24 20:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 20:49 [PATCH 00/11] mm/damon: cleanup and refactoring code SeongJae Park
2022-10-24 20:49 ` [PATCH 01/11] mm/damon/core: split out DAMOS-charged region skip logic into a new function SeongJae Park
2022-10-24 20:49 ` [PATCH 02/11] mm/damon/core: split damos application " SeongJae Park
2022-10-24 20:49 ` [PATCH 03/11] mm/damon/core: split out scheme stat update " SeongJae Park
2022-10-24 20:49 ` [PATCH 04/11] mm/damon/core: split out scheme quota adjustment " SeongJae Park
2022-10-24 20:49 ` [PATCH 05/11] mm/damon/sysfs: use damon_addr_range for regions' start and end values SeongJae Park
2022-10-24 20:49 ` [PATCH 06/11] mm/damon/sysfs: remove parameters of damon_sysfs_region_alloc() SeongJae Park
2022-10-24 20:49 ` [PATCH 07/11] mm/damon/sysfs: move sysfs_lock to common module SeongJae Park
2022-10-24 20:49 ` [PATCH 08/11] mm/damon/sysfs: move unsigned long range directory " SeongJae Park
2022-10-24 20:49 ` [PATCH 09/11] mm/damon/sysfs: split out kdamond-independent schemes stats update logic into a new function SeongJae Park
2022-10-24 20:49 ` [PATCH 10/11] mm/damon/modules: deduplicate init steps for DAMON context setup SeongJae Park
2022-10-24 20:49 ` [PATCH 11/11] mm/damon/{reclaim,lru_sort}: remove unnecessarily included headers SeongJae Park

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