linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: 胡玮文 <sehuww@mail.scut.edu.cn>
Cc: Minchan Kim <minchan@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] mm: introduce page pinner
Date: Wed, 8 Dec 2021 14:24:11 +0000	[thread overview]
Message-ID: <YbDAC1Ab/2bnI+Mz@casper.infradead.org> (raw)
In-Reply-To: <20211208115250.GA17274@DESKTOP-N4CECTO.huww98.cn>

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.

  reply	other threads:[~2021-12-08 14:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 18:47 [RFC] mm: introduce page pinner Minchan Kim
2021-12-08 11:54 ` 胡玮文
2021-12-08 14:24   ` Matthew Wilcox [this message]
2021-12-08 18:42   ` Minchan Kim
     [not found]     ` <TYCP286MB2066003B2045AD6ABE4C0295C0719@TYCP286MB2066.JPNP286.PROD.OUTLOOK.COM>
2021-12-12  7:21       ` John Hubbard
2021-12-13 22:58       ` Minchan Kim
2021-12-13  1:56 ` John Hubbard
2021-12-13 23:10   ` Minchan Kim
2021-12-14 18:27     ` John Hubbard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YbDAC1Ab/2bnI+Mz@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=sehuww@mail.scut.edu.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).