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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Jun 2021 12:55:27 +0000
From:   "Shah, Amit" <aams@...zon.de>
To:     "sj38.park@...il.com" <sj38.park@...il.com>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
CC:     "david@...hat.com" <david@...hat.com>,
        "rientjes@...gle.com" <rientjes@...gle.com>,
        "acme@...nel.org" <acme@...nel.org>,
        "snu@...zon.de" <snu@...zon.de>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "minchan@...nel.org" <minchan@...nel.org>,
        "vdavydov.dev@...il.com" <vdavydov.dev@...il.com>,
        "linux-damon@...zon.com" <linux-damon@...zon.com>,
        "zgf574564920@...il.com" <zgf574564920@...il.com>,
        "vbabka@...e.cz" <vbabka@...e.cz>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "fan.du@...el.com" <fan.du@...el.com>,
        "Park, Seongjae" <sjpark@...zon.de>,
        "amit@...nel.org" <amit@...nel.org>,
        "gthelen@...gle.com" <gthelen@...gle.com>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
        "shuah@...nel.org" <shuah@...nel.org>,
        "Foerster, Leonard" <foersleo@...zon.de>,
        "guoju.fgj@...baba-inc.com" <guoju.fgj@...baba-inc.com>,
        "benh@...nel.crashing.org" <benh@...nel.crashing.org>,
        "shakeelb@...gle.com" <shakeelb@...gle.com>,
        "Woodhouse, David" <dwmw@...zon.co.uk>,
        "greg@...ah.com" <greg@...ah.com>,
        "alexander.shishkin@...ux.intel.com" 
        <alexander.shishkin@...ux.intel.com>,
        "rppt@...nel.org" <rppt@...nel.org>,
        "mgorman@...e.de" <mgorman@...e.de>,
        "Jonathan.Cameron@...wei.com" <Jonathan.Cameron@...wei.com>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "brendanhiggins@...gle.com" <brendanhiggins@...gle.com>,
        "corbet@....net" <corbet@....net>,
        "namhyung@...nel.org" <namhyung@...nel.org>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "elver@...gle.com" <elver@...gle.com>,
        "riel@...riel.com" <riel@...riel.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v29 04/13] mm/idle_page_tracking: Make PG_idle reusable

On Thu, 2021-05-20 at 07:56 +0000, SeongJae Park wrote:
> From: SeongJae Park <sjpark@...zon.de>
> 
> PG_idle and PG_young allow the two PTE Accessed bit users, Idle Page
> Tracking and the reclaim logic concurrently work while don't interfere

... while not interfering with ...

> each other.  That is, when they need to clear the Accessed bit, they set
> PG_young to represent the previous state of the bit, respectively.  And
> when they need to read the bit, if the bit is cleared, they further read
> the PG_young to know whether the other has cleared the bit meanwhile or
> not.
> 
> We could add another page flag and extend the mechanism to use the flag
> if we need to add another concurrent PTE Accessed bit user subsystem.
> However, the space is limited.  Meanwhile, if the new subsystem is
> mutually exclusive with IDLE_PAGE_TRACKING or interfering with it is not
> a real problem, it would be ok to simply reuse the PG_idle flag.
> However, it's impossible because the flags are dependent on
> IDLE_PAGE_TRACKING.

For better readability, I suggest:

For yet another user of the PTE Accessed bit, we could add another page
flag, or extend the mechanism to use the flags. For the DAMON usecase,
however, we don't need to do that just yet.  IDLE_PAGE_TRACKING and
DAMON are mutually exclusive, so there's only ever going to be one user
of the current set of flags. 

In this commit, we split out the CONFIG options to allow for the use of
PG_young and PG_idle outside of idle page tracking.

> 
> To allow such reuse of the flags, this commit separates the PG_young and
> PG_idle flag logic from IDLE_PAGE_TRACKING and introduces new kernel
> config, 'PAGE_IDLE_FLAG'.  Hence, a new subsystem would be able to reuse
> PG_idle without depending on IDLE_PAGE_TRACKING.
> 
> In the next commit, DAMON's reference implementation of the virtual
> memory address space monitoring primitives will use it.

[...]

Cheers,

		Amit



Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879


Powered by blists - more mailing lists