Re: [PATCH v6 2/3] mm/swap: use swap_ops to register swap device's methods

From: Chris Li

Date: Fri May 15 2026 - 20:34:55 EST


On Fri, May 15, 2026 at 2:31 PM Chris Li <chrisl@xxxxxxxxxx> wrote:
> >
> > I've been looking at this a bit more, and I think it is going very
> > much in the wrong direction. I've started drafting a version that
> > moves block to the same model as fs to build up multi-folio bios,
> > which actually allows for a clean abstraction.
>
> That is for the swapin_readahead() where multiple folios can be read
> in one batch, right? I assume It should not impact the swap out path.
> Curious to see what you have in mind. The swap_vma_readahead() can
> hit more than one swap device. The current swap_ops is per swap device
> so your multi-folio bios will likely stay in the core swap layer. I
> will take a look at your new implementation; hopefully, the swap_ops
> can adapt to that as well.

Never mind that; I just saw your swap batching series. I will reply there.

Chris