Re: [PATCH v3 2/3] mm: swap: drop dropbehind swap cache folios on writeback completion
Alexandre Ghiti <[email protected]>
| Newsgroups | org.kvack.linux-mm,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAEmasaUmA0Z0j82jF_VnYBM6gsrtDiWSf_ev-2pdYH3xPJ8Yfw@mail.gmail.com> |
Hi Matthew, On Thu, Aug 20, 2026 at 5:42 PM Matthew Wilcox <[email protected]> wrote: > > > > On Thu, Aug 20, 2026 at 07:36:42PM +0800, Barry Song wrote: > > > +void swap_writeback_dropbehind_folio(struct folio *folio) > > > +{ > > > + llist_add((struct llist_node *)&folio->lru, > > > + raw_cpu_ptr(&swap_dropbehind_llist)); > > > + queue_work(swap_dropbehind_wq, &swap_dropbehind_work); > > > +} > > > + > > > > This is good. For file dropbehind, I see both F2FS [1] and block > > devices [2] reinventing workqueues in their own filesystems or > > drivers, while folio_end_dropbehind() simply benefits from its safe, > > sleepable context. This seems a bit odd. > > > > So I'm really curious whether this could be extended to file-backed > > folios as well, so that those filesystems and device drivers don't > > have to deal with this themselves. > > You should probably both be aware of Tal's series: > > https://lore.kernel.org/linux-mm/[email protected]/ > > In fact, I'd base this series on Tal's. It would be considerably > easier. At first sight, it seems so, yes. I'm looking into it more deeply right now, thanks for letting me know! Thanks, Alex >