All of lore.kernel.org
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Vinay Banakar <vny@google.com>
Cc: SeongJae Park <sj@kernel.org>, Bharata B Rao <bharata@amd.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, willy@infradead.org, mgorman@suse.de,
	Wei Xu <weixugc@google.com>, Greg Thelen <gthelen@google.com>
Subject: Re: [PATCH] mm: Optimize TLB flushes during page reclaim
Date: Wed, 22 Jan 2025 12:05:45 -0800	[thread overview]
Message-ID: <20250122200545.43513-1-sj@kernel.org> (raw)
In-Reply-To: <CALf+9Ycp4KBnHy8r9x_gARqdwn7-1dYwutQdzFhHnTMf+GQiZQ@mail.gmail.com>

On Wed, 22 Jan 2025 07:28:56 -0600 Vinay Banakar <vny@google.com> wrote:

> On Wed, Jan 22, 2025 at 2:59 AM Bharata B Rao <bharata@amd.com> wrote:
> > While that may be true for MADV_PAGEOUT path, does the same assumption
> > hold good for other paths from which shrink_folio_list() gets called?
> 
> shrink_folio_list() is called by three other functions, each with
> different batching behavior:
> - reclaim_clean_pages_from_list(): Doesn't do PMD batching but only
> processes clean pages, so it won't take the path affected by this
> patch. This is called from the contiguous memory allocator
> (cma_alloc#alloc_contig_range)
> - shrink_inactive_list(): Reclaims inactive pages at SWAP_CLUSTER_MAX
> (default 32) at a time. With this patch, we will reduce IPIs for TLB
> flushes by a factor of 32 in kswapd
> - evict_folios(): In the MGLRU case, the number of pages
> shrink_folio_list() processes can vary between 64 (MIN_LRU_BATCH) and
> 4096 (MAX_LRU_BATCH). The reduction in IPIs will vary accordingly

damon_pa_pageout() from mm/damon/paddr.c also calls shrink_folio_list() similar
to madvise.c, but it doesn't aware such batching behavior.  Have you checked
that path?


Thanks,
SJ

> 
> Thanks!
> Vinay


  reply	other threads:[~2025-01-22 20:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-20 22:47 [PATCH] mm: Optimize TLB flushes during page reclaim Vinay Banakar
2025-01-21  0:05 ` Vinay Banakar
2025-01-22  8:59   ` Bharata B Rao
2025-01-22 11:09     ` Vinay Banakar
2025-01-22 11:31       ` Bharata B Rao
2025-01-22 13:28         ` Vinay Banakar
2025-01-22 20:05           ` SeongJae Park [this message]
2025-01-23 17:11             ` Vinay Banakar
2025-01-23 17:23               ` SeongJae Park
2025-01-23 18:17               ` Matthew Wilcox
2025-01-21  1:43 ` Byungchul Park
2025-01-21 18:03   ` Vinay Banakar
2025-01-23  4:17 ` Rik van Riel
2025-01-23 19:16   ` Vinay Banakar
2025-01-28 22:01     ` Rik van Riel
2025-03-17 19:20     ` Rik van Riel

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=20250122200545.43513-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bharata@amd.com \
    --cc=gthelen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=vny@google.com \
    --cc=weixugc@google.com \
    --cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.