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.