On Thu, 2024-12-19 at 18:23 +0100, David Hildenbrand wrote: > On 19.12.24 15:11, Rik van Riel wrote: > > > > I think we need to free those pending pages at > > some point. They can't accumulate there forever. > > However, I am not sure where those points should > > be. > > The number of entries are limited, ... > folio_batch_add() drains if folio_batch_space() returns 0 (no slots > left). > > Apparently we have PAGEVEC_SIZE slots, which is 31 ... 31 * PAGE_SIZE > stranded there. Sure enough! That was the piece I was missing last night. I guess we can get away with just draining these in the reclaim and compaction paths, and not touch them the rest of the time? That could be a nice improvement in some situations. -- All Rights Reversed.