From: Matthew Wilcox <willy@infradead.org>
To: Alistair Popple <apopple@nvidia.com>
Cc: akpm@linux-foundation.org, dhowells@redhat.com, hughd@google.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
jglisse@redhat.com, jgg@nvidia.com, rcampbell@nvidia.com,
jhubbard@nvidia.com
Subject: Re: [PATCH v3] mm/migrate.c: Rework migration_entry_wait() to not take a pageref
Date: Mon, 15 Nov 2021 17:55:34 +0000 [thread overview]
Message-ID: <YZKfFoHAhCJC4/75@casper.infradead.org> (raw)
In-Reply-To: <20211115105222.4183286-1-apopple@nvidia.com>
On Mon, Nov 15, 2021 at 09:52:22PM +1100, Alistair Popple wrote:
> +#ifdef CONFIG_MIGRATION
> +/**
> + * migration_entry_wait_on_locked - Wait for a migration entry to be removed
> + * @page: page referenced by the migration entry.
This should be @folio (you can test by running 'make htmldocs', or even
'make W=1'
> + * @ptep: mapped pte pointer. This function will return with the ptep unmapped.
> + * @ptl: already locked ptl. This function will drop the lock.
> + *
> + * Wait for a migration entry referencing the given page to be removed. This is
> + * equivalent to put_and_wait_on_page_locked(page, TASK_UNINTERRUPTIBLE) except
> + * this can be called without taking a reference on the page. Instead this
> + * should be called while holding the ptl for the migration entry referencing
> + * the page.
The tool won't tell you to update these page references to be folio
references ... so I will ;-)
> +++ b/mm/migrate.c
> @@ -305,15 +305,7 @@ void __migration_entry_wait(struct mm_struct *mm, pte_t *ptep,
> page = pfn_swap_entry_to_page(entry);
> page = compound_head(page);
I think this whole function should be folio-based. That is:
- struct page *page;
+ struct folio *folio;
and
folio = page_folio(pfn_swap_entry_to_page(entry));
next prev parent reply other threads:[~2021-11-15 17:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 10:52 [PATCH v3] mm/migrate.c: Rework migration_entry_wait() to not take a pageref Alistair Popple
2021-11-15 17:40 ` kernel test robot
2021-11-15 17:55 ` Matthew Wilcox [this message]
2021-11-15 20:40 ` kernel test robot
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=YZKfFoHAhCJC4/75@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=dhowells@redhat.com \
--cc=hughd@google.com \
--cc=jgg@nvidia.com \
--cc=jglisse@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rcampbell@nvidia.com \
/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).