[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YbDAC1Ab/2bnI+Mz@casper.infradead.org>
Date: Wed, 8 Dec 2021 14:24:11 +0000
From: Matthew Wilcox <willy@...radead.org>
To: 胡玮文 <sehuww@...l.scut.edu.cn>
Cc: Minchan Kim <minchan@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-mm <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] mm: introduce page pinner
On Wed, Dec 08, 2021 at 07:54:35PM +0800, 胡玮文 wrote:
> @@ -406,6 +409,7 @@ int folio_migrate_mapping(struct address_space *mapping,
> xas_lock_irq(&xas);
> if (!folio_ref_freeze(folio, expected_count)) {
> xas_unlock_irq(&xas);
> + page_pinner_failure(&folio->page);
> return -EAGAIN;
> }
>
> I'm not sure what to do with the new folio, it seems using folio->page in new
> codes is not correct.
It's a transitional measure. Once everything that should be converted
to folios has been converted, it can go away.
Tail pages don't have their own refcounts, so the page pinner should
actually be the folio pinner. I hadn't bothered to point this out
because we're in the early days of the folio transition and it'd be
unreasonable to criticise Minchan for not converting his patch from
pages to folios.
Powered by blists - more mailing lists