[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <62c945d75e2cd29f27d2f62b2a7d31fa1b2461ae.camel@surriel.com>
Date: Tue, 28 Jan 2025 17:01:02 -0500
From: Rik van Riel <riel@...riel.com>
To: Vinay Banakar <vny@...gle.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, willy@...radead.org, mgorman@...e.de, Wei Xu
<weixugc@...gle.com>, Greg Thelen <gthelen@...gle.com>
Subject: Re: [PATCH] mm: Optimize TLB flushes during page reclaim
On Thu, 2025-01-23 at 13:16 -0600, Vinay Banakar wrote:
>
> I initially assumed that all paths leading to shrink_folio_list()
> submitted 512 pages at a time. Turns out this is only true for the
> madvise path.
> The other paths have different batch sizes:
> - shrink_inactive_list(): Uses SWAP_CLUSTER_MAX (32 pages)
> - evict_folios(): Varies between 64 and 4096 pages (MGLRU)
> - damon_pa_pageout(): Variable size based on DAMON region
> - reclaim_clean_pages_from_list(): Clean pages only, unaffected by
> this patch
>
> We have two options:
> 1. Keep the current logic where TLB flush batching varies by caller
> 2. Enforce consistent 512-page batching in shrink_folio_list() and
> also convert to folio_batch as suggested by Matthew
My preference would be to fix one thing at a time,
and simply remove the comments that suggest everything
is done at PMD level.
I'll ACK the patch if the misleading comments and
changelog text are removed or fixed up :)
--
All Rights Reversed.
Powered by blists - more mailing lists