mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Shah, Amit" <aams@amazon.de>
To: "sj38.park@gmail.com" <sj38.park@gmail.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Cc: "david@redhat.com" <david@redhat.com>,
	"rientjes@google.com" <rientjes@google.com>,
	"acme@kernel.org" <acme@kernel.org>,
	"snu@amazon.de" <snu@amazon.de>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"minchan@kernel.org" <minchan@kernel.org>,
	"vdavydov.dev@gmail.com" <vdavydov.dev@gmail.com>,
	"linux-damon@amazon.com" <linux-damon@amazon.com>,
	"zgf574564920@gmail.com" <zgf574564920@gmail.com>,
	"vbabka@suse.cz" <vbabka@suse.cz>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"fan.du@intel.com" <fan.du@intel.com>,
	"Park, Seongjae" <sjpark@amazon.de>,
	"amit@kernel.org" <amit@kernel.org>,
	"gthelen@google.com" <gthelen@google.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"Foerster, Leonard" <foersleo@amazon.de>,
	"guoju.fgj@alibaba-inc.com" <guoju.fgj@alibaba-inc.com>,
	"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
	"shakeelb@google.com" <shakeelb@google.com>,
	"Woodhouse, David" <dwmw@amazon.co.uk>,
	"greg@kroah.com" <greg@kroah.com>,
	"alexander.shishkin@linux.intel.com" 
	<alexander.shishkin@linux.intel.com>,
	"rppt@kernel.org" <rppt@kernel.org>,
	"mgorman@suse.de" <mgorman@suse.de>,
	"Jonathan.Cameron@Huawei.com" <Jonathan.Cameron@Huawei.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"brendanhiggins@google.com" <brendanhiggins@google.com>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"namhyung@kernel.org" <namhyung@kernel.org>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"elver@google.com" <elver@google.com>,
	"riel@surriel.com" <riel@surriel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v29 04/13] mm/idle_page_tracking: Make PG_idle reusable
Date: Fri, 11 Jun 2021 12:55:27 +0000	[thread overview]
Message-ID: <ac98333d677a3ae8d25a998816e025954826e5c1.camel@amazon.com> (raw)
In-Reply-To: <20210520075629.4332-5-sj38.park@gmail.com>

On Thu, 2021-05-20 at 07:56 +0000, SeongJae Park wrote:
> From: SeongJae Park <sjpark@amazon.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



  reply	other threads:[~2021-06-11 12:55 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20  7:56 [PATCH v29 00/13] Introduce Data Access MONitor (DAMON) SeongJae Park
2021-05-20  7:56 ` [PATCH v29 01/13] mm: " SeongJae Park
2021-05-20  7:56 ` [PATCH v29 02/13] mm/damon/core: Implement region-based sampling SeongJae Park
2021-05-20  7:56 ` [PATCH v29 03/13] mm/damon: Adaptively adjust regions SeongJae Park
2021-05-25 15:17   ` sieberf
2021-05-25 15:39     ` SeongJae Park
2021-05-20  7:56 ` [PATCH v29 04/13] mm/idle_page_tracking: Make PG_idle reusable SeongJae Park
2021-06-11 12:55   ` Shah, Amit [this message]
2021-06-11 13:49     ` SeongJae Park
2021-05-20  7:56 ` [PATCH v29 05/13] mm/damon: Implement primitives for the virtual memory address spaces SeongJae Park
2021-05-25 15:19   ` sieberf
2021-05-25 15:44     ` SeongJae Park
2021-05-20  7:56 ` [PATCH v29 06/13] mm/damon: Add a tracepoint SeongJae Park
2021-05-20  7:56 ` [PATCH v29 07/13] mm/damon: Implement a debugfs-based user space interface SeongJae Park
2021-06-11 18:59   ` sieberf
2021-06-14  6:48     ` SeongJae Park
2021-05-20  7:56 ` [PATCH v29 08/13] mm/damon/dbgfs: Export kdamond pid to the user space SeongJae Park
2021-05-20  7:56 ` [PATCH v29 09/13] mm/damon/dbgfs: Support multiple contexts SeongJae Park
2021-06-14  9:30   ` sieberf
2021-06-14  9:35     ` SeongJae Park
2021-06-14  9:44     ` Greg KH
2021-05-20  7:56 ` [PATCH v29 10/13] Documentation: Add documents for DAMON SeongJae Park
2021-06-09  7:03   ` SeongJae Park
2021-06-11 17:44   ` Boehme, Markus
2021-06-11 18:53     ` SeongJae Park
2021-05-20  7:56 ` [PATCH v29 11/13] mm/damon: Add kunit tests SeongJae Park
2021-05-20  7:56 ` [PATCH v29 12/13] mm/damon: Add user space selftests SeongJae Park
2021-06-11 13:57   ` Maximilian Heyne
2021-06-11 14:04     ` SeongJae Park
2021-05-20  7:56 ` [PATCH v29 13/13] MAINTAINERS: Update for DAMON SeongJae Park
2021-05-20 22:34 ` [PATCH v29 00/13] Introduce Data Access MONitor (DAMON) Andrew Morton
2021-05-21  2:53   ` Shakeel Butt
2021-05-21  8:55   ` Shah, Amit
2021-06-14  8:09 ` sieberf
2021-06-15 16:30   ` sieberf

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=ac98333d677a3ae8d25a998816e025954826e5c1.camel@amazon.com \
    --to=aams@amazon.de \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=acme@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=amit@kernel.org \
    --cc=benh@kernel.crashing.org \
    --cc=brendanhiggins@google.com \
    --cc=corbet@lwn.net \
    --cc=david@redhat.com \
    --cc=dwmw@amazon.co.uk \
    --cc=elver@google.com \
    --cc=fan.du@intel.com \
    --cc=foersleo@amazon.de \
    --cc=greg@kroah.com \
    --cc=gthelen@google.com \
    --cc=guoju.fgj@alibaba-inc.com \
    --cc=linux-damon@amazon.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=minchan@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@surriel.com \
    --cc=rientjes@google.com \
    --cc=rostedt@goodmis.org \
    --cc=rppt@kernel.org \
    --cc=shakeelb@google.com \
    --cc=shuah@kernel.org \
    --cc=sj38.park@gmail.com \
    --cc=sjpark@amazon.de \
    --cc=snu@amazon.de \
    --cc=vbabka@suse.cz \
    --cc=vdavydov.dev@gmail.com \
    --cc=zgf574564920@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

all inboxes | Powered by JetHome®