lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200928103528.4256-1-sjpark@amazon.com>
Date:   Mon, 28 Sep 2020 12:35:23 +0200
From:   SeongJae Park <sjpark@...zon.com>
To:     <akpm@...ux-foundation.org>
CC:     SeongJae Park <sjpark@...zon.de>, <Jonathan.Cameron@...wei.com>,
        <aarcange@...hat.com>, <acme@...nel.org>,
        <alexander.shishkin@...ux.intel.com>, <amit@...nel.org>,
        <benh@...nel.crashing.org>, <brendan.d.gregg@...il.com>,
        <brendanhiggins@...gle.com>, <cai@....pw>,
        <colin.king@...onical.com>, <corbet@....net>, <david@...hat.com>,
        <dwmw@...zon.com>, <elver@...gle.com>, <fan.du@...el.com>,
        <foersleo@...zon.de>, <gthelen@...gle.com>, <irogers@...gle.com>,
        <jolsa@...hat.com>, <kirill@...temov.name>, <mark.rutland@....com>,
        <mgorman@...e.de>, <minchan@...nel.org>, <mingo@...hat.com>,
        <namhyung@...nel.org>, <peterz@...radead.org>,
        <rdunlap@...radead.org>, <riel@...riel.com>, <rientjes@...gle.com>,
        <rostedt@...dmis.org>, <rppt@...nel.org>, <sblbir@...zon.com>,
        <shakeelb@...gle.com>, <shuah@...nel.org>, <sj38.park@...il.com>,
        <snu@...zon.de>, <vbabka@...e.cz>, <vdavydov.dev@...il.com>,
        <yang.shi@...ux.alibaba.com>, <ying.huang@...el.com>,
        <zgf574564920@...il.com>, <linux-damon@...zon.com>,
        <linux-mm@...ck.org>, <linux-doc@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: [RFC PATCH 0/5] DAMON: Make coexistable with Idle Page Tracking

From: SeongJae Park <sjpark@...zon.de>

NOTE: This is an RFC for future change of DAMON patchsets[1,2,3], which is not
merged in the mainline yet.  The aim of this RFC is to show how the patchset
would be changed in the next version.  So, if you have some interest in this
RFC, please consider reviewing the DAMON patchset, either.

Currently, DAMON is configured to be exclusive with Idle Page Tracking because
both of the subsystems use PG_Idle flag and there is no way to synchronize with
Idle Page Tracking.  Though there are many use cases DAMON could do better than
Idle Page Tracking, DAMON cannot fully replace Idle Page Tracking, since

- DAMON doesn't support all features of Idle Page Tracking from the beginning
  (e.g., physical address space is supported from the third DAMON patchset[3]),
  and
- there are some use cases Idle Page Tracking could be more efficient (e.g.,
  page size granularity working set size calculation).

Therefore, this patchset makes DAMON coexistable with Idle Page Tracking.  As
the first decision of making DAMON exclusive was not a good idea, this change
will be merged in the next versions of the original patchsets[1,2,3].
Therefore, you could skip detail of the changes but wait for postings of the
next versions of the patchsets, except the 4th patch.

The changes significantly refactor the code, especially 'damon.c' and
'damon-test.c'.  Though the refactoring changes are only straightforward, if
you gave 'Reviewed-by' before and you want to drop it due to the changes,
please let me know.

[1] https://lore.kernel.org/linux-mm/20200817105137.19296-1-sjpark@amazon.com/
[2] https://lore.kernel.org/linux-mm/20200804142430.15384-1-sjpark@amazon.com/
[3] https://lore.kernel.org/linux-mm/20200831104730.28970-1-sjpark@amazon.com/

Sequence of Patches
===================

The 1st patch separates DAMON components that unnecessarily implemented in one
source file and depend on one config option (CONFIG_DAMON)
to multiple files and apply fine-grained dependency.  As a result, the core
framework part of DAMON becomes coexistable with Idle Page Tracking.

Following two patches further refactor the code for cleaner bound between the
components.

The 4th patch implements a synchronization infrastructure for PG_idle flag
users.  We implement it to eventually used for DAMON, but the change is
independent with DAMON and the also required for Idle Page Tracking itself.
This could be picked before DAMON patchsets merged.

Finally, the 5th patch updates DAMON to use the PG_idle synchronization
infrastructure and fully coexistable with Page Idle Tracking.

Baseline and Complete Git Trees
===============================

The patches are based on the v5.8 plus DAMON v20 patchset[1], RFC v14 of DAMOS
patchset, RFC v8 of physical address space support patchset, RFC v1 of user
space improvement[4], and some more trivial fixes (s/snprintf/scnprintf).  You
can also clone the complete git tree:

    $ git clone git://github.com/sjp38/linux -b damon-usi/rfc/v1

The web is also available:
https://github.com/sjp38/linux/releases/tag/damon-usi/rfc/v1


[1] https://lore.kernel.org/linux-mm/20200817105137.19296-1-sjpark@amazon.com/
[2] https://lore.kernel.org/linux-mm/20200804142430.15384-1-sjpark@amazon.com/
[3] https://lore.kernel.org/linux-mm/20200831104730.28970-1-sjpark@amazon.com/
[4] https://lore.kernel.org/linux-mm/20200915180807.18812-1-sjpark@amazon.com/

SeongJae Park (5):
  mm/damon: Separate components and apply fine-grained dependencies
  mm/damon: Separate DAMON schemes application to primitives
  mm/damon: Move recording feature from core to dbgfs
  mm/page_idle: Avoid interferences from concurrent users
  mm/damon/primitives: Make coexistable with Idle Page Tracking

 .../admin-guide/mm/idle_page_tracking.rst     |   22 +-
 MAINTAINERS                                   |    3 +-
 include/linux/damon.h                         |  109 +-
 include/linux/page_idle.h                     |    2 +
 mm/Kconfig                                    |   25 +-
 mm/Makefile                                   |    2 +-
 mm/damon-test.h                               |  724 -----
 mm/damon.c                                    | 2754 -----------------
 mm/damon/Kconfig                              |   68 +
 mm/damon/Makefile                             |    5 +
 mm/damon/core-test.h                          |  253 ++
 mm/damon/core.c                               |  860 +++++
 mm/damon/damon.h                              |    7 +
 mm/damon/dbgfs-test.h                         |  264 ++
 mm/damon/dbgfs.c                              | 1158 +++++++
 mm/damon/primitives-test.h                    |  328 ++
 mm/damon/primitives.c                         |  896 ++++++
 mm/page_idle.c                                |   40 +
 18 files changed, 3982 insertions(+), 3538 deletions(-)
 delete mode 100644 mm/damon-test.h
 delete mode 100644 mm/damon.c
 create mode 100644 mm/damon/Kconfig
 create mode 100644 mm/damon/Makefile
 create mode 100644 mm/damon/core-test.h
 create mode 100644 mm/damon/core.c
 create mode 100644 mm/damon/damon.h
 create mode 100644 mm/damon/dbgfs-test.h
 create mode 100644 mm/damon/dbgfs.c
 create mode 100644 mm/damon/primitives-test.h
 create mode 100644 mm/damon/primitives.c

-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ