Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Kunwu Chan <kunwu.chan@gmail.com>
Cc: SeongJae Park <sj@kernel.org>,
	akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org,
	liam@infradead.org, vbabka@kernel.org, rppt@kernel.org,
	surenb@google.com, mhocko@suse.com, corbet@lwn.net,
	skhan@linuxfoundation.org, damon@lists.linux.dev,
	linux-mm@kvack.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Wang Lian <lianux.mm@gmail.com>
Subject: Re: [PATCH] Docs/damon: add TLB flush policy document
Date: Fri,  5 Jun 2026 17:54:31 -0700	[thread overview]
Message-ID: <20260606005431.89186-1-sj@kernel.org> (raw)
In-Reply-To: <20260605031008.397328-1-kunwu.chan@linux.dev>

Hi Kunwu and Lian,

On Fri,  5 Jun 2026 11:10:08 +0800 Kunwu Chan <kunwu.chan@gmail.com> wrote:

> From: Kunwu Chan <kunwu.chan@gmail.com>
> 
> DAMON avoids TLB flushes after clearing PTE Accessed bits for sampling.
> The overhead was measured and found significant [1].  Production
> workloads with large working sets flush TLB buffers naturally, so
> accuracy impact is negligible.
> 
> On systems with large TLB buffers and small test workloads, stale TLB
> entries persist across sampling intervals and produce false negatives.
> This comes up repeatedly on the mailing list and in private inquiries
> [2][3].
> 
> Add a document on the design decision, trade-offs, test environment
> problems, and recommendations.
> 
> Link: https://lore.kernel.org/20200403103059.12762-1-sjpark@amazon.com [1]
> Link: https://lore.kernel.org/20260117020731.226785-3-sj@kernel.org [2]
> Link: https://lore.kernel.org/all/20260526145034.91594-1-sj@kernel.org [3]

Thank you for this great patch!

> 
> Co-developed-by: Wang Lian <lianux.mm@gmail.com>
> Signed-off-by: Wang Lian <lianux.mm@gmail.com>
> Signed-off-by: Kunwu Chan <kunwu.chan@gmail.com>
> ---
>  Documentation/mm/damon/index.rst     |   1 +
>  Documentation/mm/damon/tlb_flush.rst | 131 +++++++++++++++++++++++++++
>  2 files changed, 132 insertions(+)
>  create mode 100644 Documentation/mm/damon/tlb_flush.rst
> 
> diff --git a/Documentation/mm/damon/index.rst b/Documentation/mm/damon/index.rst
> index 318f6a7bfea4..5e239437dab3 100644
> --- a/Documentation/mm/damon/index.rst
> +++ b/Documentation/mm/damon/index.rst
> @@ -19,6 +19,7 @@ DAMON is a Linux kernel subsystem for efficient :ref:`data access monitoring
>  
>     faq
>     design
> +   tlb_flush
>     api
>     maintainer-profile
>  
> diff --git a/Documentation/mm/damon/tlb_flush.rst b/Documentation/mm/damon/tlb_flush.rst
> new file mode 100644
[...]

Great document!  That said, it feels like a good complete article or a paper,
rather than DAMON documentation that pursue to be short and essential.  I feel
like this fit more to be published in a blog like DAMON project blog [1], or
news site like LWN.  If you'd like to, please feel free to upload a PR or send
patch for DAMON project blog source [2].

Mainly due to the verbosity, as I above mentionedd, I'm not sure if the current
shape of this patch is the best to be merged as is.  I also find the background
part of the document is a kind of duplicate of some information in design.rst.
What about putting only essential information in a condensed way on the
design.rst?

[1] https://damonitor.github.io/site_about
[2] https://github.com/damonitor/damonitor.github.io/tree/master/blog_src


Thanks,
SJ

[...]


      reply	other threads:[~2026-06-06  0:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05  3:10 [PATCH] Docs/damon: add TLB flush policy document Kunwu Chan
2026-06-06  0:54 ` SeongJae Park [this message]

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=20260606005431.89186-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=damon@lists.linux.dev \
    --cc=david@kernel.org \
    --cc=kunwu.chan@gmail.com \
    --cc=liam@infradead.org \
    --cc=lianux.mm@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    /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