From: <sjpark@amazon.com>
To: <akpm@linux-foundation.org>
Cc: SeongJae Park <sjpark@amazon.de>, <acme@kernel.org>,
<alexander.shishkin@linux.intel.com>, <amit@kernel.org>,
<brendan.d.gregg@gmail.com>, <brendanhiggins@google.com>,
<cai@lca.pw>, <colin.king@canonical.com>, <corbet@lwn.net>,
<dwmw@amazon.com>, <jolsa@redhat.com>, <kirill@shutemov.name>,
<mark.rutland@arm.com>, <mgorman@suse.de>, <minchan@kernel.org>,
<mingo@redhat.com>, <namhyung@kernel.org>, <peterz@infradead.org>,
<rdunlap@infradead.org>, <rostedt@goodmis.org>,
<sj38.park@gmail.com>, <vdavydov.dev@gmail.com>,
<linux-mm@kvack.org>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [RFC PATCH 0/3] DAMON: Implement The Data Access Pattern Awared Memory Management Rules
Date: Mon, 10 Feb 2020 16:09:18 +0100 [thread overview]
Message-ID: <20200210150921.32482-1-sjpark@amazon.com> (raw)
From: SeongJae Park <sjpark@amazon.de>
DAMON can make data access pattern awared memory management optimizations much
easier. That said, users who want such optimizations should run DAMON, read
the monitoring results, analyze it, plan a new memory management scheme, and
apply the new scheme by themselves. It would not be too hard, but still
require some level of efforts. Such efforts will be really necessary in some
complicated cases.
However, in many other cases, the optimizations would have a simple and common
pattern. For example, the users would just want the system to apply an actions
to a memory region of a specific size having a specific access frequency for a
specific time. For example, "page out a memory region larger than 100 MiB but
having a low access frequency more than 10 minutes", or "Use THP for a memory
region larger than 2 MiB having a high access frequency for more than 2
seconds".
This RFC patchset makes DAMON to receive and do such simple optimizations. All
the things users need to do for such simple cases is only to specify their
requests to DAMON in a form of rules.
For the actions, current implementation supports only a few of ``madvise()``
hints, ``MADV_WILLNEED``, ``MADV_COLD``, ``MADV_PAGEOUT``, ``MADV_HUGEPAGE``,
and ``MADV_NOHUGEPAGE``.
Sequence Of Patches
===================
The first patch allows DAMON to reuse ``madvise()`` code. The second patch
implements the data access pattern awared memory management rules and its
kernel space programming interface. Finally, the third patch implements a
debugfs interface for privileged user space people and programs.
The patches are based on the v5.5 plus v4 DAMON patchset[1] and Minchan's
``madvise()`` factoring out patch[2]. Minchan's patch was necessary for reuse
of ``madvise()`` code. You can also clone the complete git tree:
$ git clone git://github.com/sjp38/linux -b damon/rules/rfc/v1
The web is also available:
https://github.com/sjp38/linux/releases/tag/damon/rules/rfc/v1
[1] https://lore.kernel.org/linux-mm/20200210144812.26845-1-sjpark@amazon.com/
[2] https://lore.kernel.org/linux-mm/20200128001641.5086-2-minchan@kernel.org/
SeongJae Park (3):
mm/madvise: Export madvise_common() to mm internal code
mm/damon/rules: Implement access pattern based management rules
mm/damon/rules: Implement a debugfs interface
include/linux/damon.h | 28 ++++
mm/damon.c | 317 +++++++++++++++++++++++++++++++++++++++++-
mm/internal.h | 4 +
mm/madvise.c | 2 +-
4 files changed, 346 insertions(+), 5 deletions(-)
--
2.17.1
next reply other threads:[~2020-02-10 15:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-10 15:09 sjpark [this message]
2020-02-10 15:09 ` [RFC PATCH 1/3] mm/madvise: Export madvise_common() to mm internal code sjpark
2020-02-10 15:09 ` [RFC PATCH 2/3] mm/damon/rules: Implement access pattern based management rules sjpark
2020-02-10 15:09 ` [RFC PATCH 3/3] mm/damon/rules: Implement a debugfs interface sjpark
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=20200210150921.32482-1-sjpark@amazon.com \
--to=sjpark@amazon.com \
--cc=acme@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=amit@kernel.org \
--cc=brendan.d.gregg@gmail.com \
--cc=brendanhiggins@google.com \
--cc=cai@lca.pw \
--cc=colin.king@canonical.com \
--cc=corbet@lwn.net \
--cc=dwmw@amazon.com \
--cc=jolsa@redhat.com \
--cc=kirill@shutemov.name \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sj38.park@gmail.com \
--cc=sjpark@amazon.de \
--cc=vdavydov.dev@gmail.com \
/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).