[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z5KHs8bY8qt6GW60@casper.infradead.org>
Date: Thu, 23 Jan 2025 18:17:23 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Vinay Banakar <vny@...gle.com>
Cc: SeongJae Park <sj@...nel.org>, Bharata B Rao <bharata@....com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.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, Jan 23, 2025 at 11:11:13AM -0600, Vinay Banakar wrote:
> Another option would be to modify shrink_folio_list() to force batch
> flushes for up to N pages (512) at a time, rather than relying on
> callers to do the batching via folio_list.
If you really want to improve performance, consider converting
shrink_folio_list() to take a folio_batch. I did this for
page freeing:
https://lore.kernel.org/all/20240227174254.710559-1-willy@infradead.org/
and we did in fact see a regression (due to shrinking the batch size
from 32 to 15). We then increased the batch size from 15 to 31 and
saw a 12.5% performance improvement on the page_fault2 benchmark
over the original batch size of 32. Commit 9cecde80aae0 and
https://lore.kernel.org/oe-lkp/202403151058.7048f6a8-oliver.sang@intel.com/
have some more details.
I think you should be able to see a noticable improvement by going from
a list with 512 entries on it to a batch of 31 entries.
Powered by blists - more mailing lists