On Mon, 2025-01-20 at 16:47 -0600, Vinay Banakar wrote: > > This patch instead optimizes the process by batching operations, > issuing one IPI per PMD instead of per page. This reduces interrupts > by a factor of 512 and enables batching page submissions to BIO. The > new approach: > 1. Collect dirty pages that need to be written back > 2. Issue a single TLB flush for all dirty pages in the batch > 3. Process the collected pages for writebacks (submit to BIO) > I see how moving the arch_tlbbatch_flush to between unmapping the pages, and issuing the IO could reduce TLB flushing operations significantly. However, how does that lead to PMD level operations? I don't see any code in your patch that gathers things at the PMD level. The code simply operates on whatever folio size is on the list that is being passed to shrink_folio_list() Is the PMD level thing some MGLRU specific feature? > > I'd appreciate your feedback on this approach, especially on the > correctness of batched BIO submissions. Looking forward to your > comments. > Maybe the filesystem people have more comments on this aspect, but from a VM perspective I suspect that doing that batch flush in one spot, and then iterating over the pages should be fine. My main quibble is with the changelog, and the comment that refers to "PMD level" operations, when the code does not appear to be doing any PMD level coalescing. -- All Rights Reversed.