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-prev] [day] [month] [year] [list]
Date:   Thu, 20 Aug 2020 19:33:10 +0200
From:   SeongJae Park <sjpark@...zon.com>
To:     Shakeel Butt <shakeelb@...gle.com>
CC:     SeongJae Park <sjpark@...zon.com>, <Jonathan.Cameron@...wei.com>,
        "Andrea Arcangeli" <aarcange@...hat.com>, <acme@...nel.org>,
        <alexander.shishkin@...ux.intel.com>, <amit@...nel.org>,
        <benh@...nel.crashing.org>, <brendan.d.gregg@...il.com>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        Qian Cai <cai@....pw>,
        Colin Ian King <colin.king@...onical.com>,
        Jonathan Corbet <corbet@....net>,
        "David Hildenbrand" <david@...hat.com>, <dwmw@...zon.com>,
        "Du, Fan" <fan.du@...el.com>, <foersleo@...zon.de>,
        Greg Thelen <gthelen@...gle.com>,
        Ian Rogers <irogers@...gle.com>, <jolsa@...hat.com>,
        "Kirill A. Shutemov" <kirill@...temov.name>,
        <mark.rutland@....com>, Mel Gorman <mgorman@...e.de>,
        Minchan Kim <minchan@...nel.org>,
        Ingo Molnar <mingo@...hat.com>, <namhyung@...nel.org>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        Rik van Riel <riel@...riel.com>,
        David Rientjes <rientjes@...gle.com>,
        Steven Rostedt <rostedt@...dmis.org>, <rppt@...nel.org>,
        <sblbir@...zon.com>, <shuah@...nel.org>, <sj38.park@...il.com>,
        <snu@...zon.de>, Vlastimil Babka <vbabka@...e.cz>,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        Yang Shi <yang.shi@...ux.alibaba.com>,
        Huang Ying <ying.huang@...el.com>, <zgf574564920@...il.com>,
        <linux-damon@...zon.com>, Linux MM <linux-mm@...ck.org>,
        <linux-doc@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC v7 00/10] DAMON: Support Physical Memory Address Space Monitoring

On Thu, 20 Aug 2020 08:44:33 -0700 Shakeel Butt <shakeelb@...gle.com> wrote:

> On Thu, Aug 20, 2020 at 12:11 AM SeongJae Park <sjpark@...zon.com> wrote:
> >
> > On Wed, 19 Aug 2020 18:21:44 -0700 Shakeel Butt <shakeelb@...gle.com> wrote:
> >
> > > On Tue, Aug 18, 2020 at 12:25 AM SeongJae Park <sjpark@...zon.com> wrote:
> > > >
> > > > From: SeongJae Park <sjpark@...zon.de>
> > > >
> > > > Changes from Previous Version
> > > > =============================
> > > >
> > > > - Use 42 as the fake target id for paddr instead of -1
> > > > - Fix a typo
> > > >
> > > > Introduction
> > > > ============
> > > >
> > > > DAMON[1] programming interface users can extend DAMON for any address space by
> > > > configuring the address-space specific low level primitives with appropriate
> > > > ones including their own implementations.  However, because the implementation
> > > > for the virtual address space is only available now, the users should implement
> > > > their own for other address spaces.  Worse yet, the user space users who rely
> > > > on the debugfs interface and user space tool, cannot implement their own.
> > > >
> > > > This patchset implements another reference implementation of the low level
> > > > primitives for the physical memory address space.  With this change, hence, the
> > > > kernel space users can monitor both the virtual and the physical address spaces
> > > > by simply changing the configuration in the runtime.  Further, this patchset
> > > > links the implementation to the debugfs interface and the user space tool for
> > > > the user space users.
> > > >
> > > > Note that the implementation supports only the user memory, as same to the idle
> > > > page access tracking feature.
> > > >
> > > > [1] https://lore.kernel.org/linux-mm/20200706115322.29598-1-sjpark@amazon.com/
> > > >
> > >
> > > I am still struggling to find the benefit of this feature the way it
> > > is implemented i.e. region based physical address space monitoring.
> > > What exactly am I supposed to do for a given hot (or cold) physical
> > > region? In a containerized world, that region can contain pages from
> > > any cgroup. I can not really do anything about the accesses PHY-DAMON
> > > provides me for a region.
> >
> > Technically speaking, this patchset introduces an implementation of DAMON's low
> > level primitives for physical address space of LRU-listed pages.  In other
> > words, it is not designed for cgroups case.
> 
> So, this RFC is for a system running a single workload which comprises
> multiple processes. Instead of registering each process with DAMON,
> just monitor the whole physical memory, right?

Right.  Also I assumed the kernel space DAMON users as the primary users of
this feature.

> 
> Though I am still not sure how the output from DAMON can be used in
> this case. DAMON told me a physical region is cold, how do I find out
> processes that have mapped the pages in that region to do
> process_madvise(PAGEOUT) on them?

Seems you are saying about the user space DAMON use.  Indeed, it would be quite
complicated.  For example, maybe the user space could read '/proc/pid/pagemap'
of every process, but this really sounds awkward.  Thank you for pointing this
:)  Even in the virtual address case, it could be complicated.

For this reason, I am developing DAMON-based Operation Schemes[1].  It is
designed to do the monitoring and optimization of specific regions fit in
special monitoring result by DAMON itself.  Nonetheless, current version of it
supports only virtual address spaces.  A support of physical address space from
the feature will be another future work.

If the user space really need to do that by itself, we could provide the
physical address to virtual address mapping info in addition to the monitoring
result in future.

And, yes, we have so many TODO tasks that really necessary.  I will eventually
do all of those, but also concerning about my limited time.  Nevertheless, I
believe it would better to focus on the core of DAMON[2] for now and continue
further TODO tasks after it is merged in the mainline, because maintainance of
the code will be much easier and hopefully more developers could collaborate
for the many TODO tasks.

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


Thanks,
SeongJae Park

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ