Re: [PATCH v9 14/41] mm: swap: Introduce lru_add_drain_progressive()
Sean Christopherson <[email protected]> Mon, 3 Aug 2026 08:03:41 -0700
| Newsgroups | org.kernel.vger.linux-trace-kernel,dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jul 31, 2026, David Hildenbrand (Arm) wrote: > I sent a fix for the GUP code that always makes us drain right now: > > https://lore.kernel.org/r/20260731-check_and_migrate_movable_folios-v1-1-e0002d7b791e@kernel.org > > Would the following (agains mm-unstable + fix) work for you? > > > I assume that you'd have to call it as > > lru_cache_drain_for_folio(folio, 0, NULL); > > But maybe there are indeed extra references that are not reflected in > folio_expected_ref_count() that you would have to consider? I doubt it, but please check if > there would be a problem. > > There is a small problem for merging: > > (1) The patch depends on the fix. > > (2) mm/swap.c was moved to mm/folio.c in the mm tree. > > We could write what I have below against Linus' tree and have the conflict be > resolved when merging. Topic branches are unfortunately not yet a thing in MM > land. Are you expecting the aforementioned fix to land in 7.2, 7.3, or 7.4? If it's 7.2 or 7.3, then I would strongly prefer to base v10 on linux-next (where the fix will presumably land soonish), and target 7.4 for in-place conversion. Then v10 can be applied against an early 7.3-rcN and we don't need to juggle branches (assuming Andrew is ok taking the proposed patch through the KVM tree). Irrespective of this small mm issue, it's getting a bit too late in the 7.3 cycle to land the in-place series, and we need to address Xiaoyao's comments, i.e. v10 is going to be necessary no matter what.