Re: [PATCH 03/24] mm/swap: move no readahead swapin code to a stand alone helper

From: Kairui Song
Date: Mon Nov 20 2023 - 06:15:18 EST


Matthew Wilcox <willy@xxxxxxxxxxxxx> 于2023年11月20日周一 05:00写道:
>
> On Mon, Nov 20, 2023 at 03:47:19AM +0800, Kairui Song wrote:
> > + /* skip swapcache and readahead */
> > + page = swapin_no_readahead(entry, GFP_HIGHUSER_MOVABLE,
> > + vmf);
> > + if (page)
> > + folio = page_folio(page);
>
> I think this should rather be:
>
> folio = swapin_no_readahead(entry,
> GFP_HIGHUSER_MOVABLE, vma);
> page = &folio->page;
>
> and have swapin_no_readahead() work entirely in terms of folios.
>

Thanks for the review!

Good suggestion, I was actually thinking about converting more swapin
function to use folio in later series, since that involved more
changes, and this series is getting a bit too long.
I'll try to see if I can reorganize the series to cover that too in a
sensible way.