From: David Hildenbrand <david@redhat.com>
To: Matthew Wilcox <willy@infradead.org>, linux-mm@kvack.org
Subject: Re: Migrate (from, to) or (to, from)?
Date: Mon, 10 May 2021 10:57:36 +0200 [thread overview]
Message-ID: <cd0ae5ed-cbac-f3e0-7fc7-1392a0c7f7de@redhat.com> (raw)
In-Reply-To: <YJVBFuMRVHVXqtTT@casper.infradead.org>
On 07.05.21 15:31, Matthew Wilcox wrote:
>
> A survey:
>
> include/linux/page_owner.h:static inline void copy_page_owner(struct page *oldpage, struct page *newpage)
>
> mm/migration.c:
> void remove_migration_ptes(struct page *old, struct page *new, bool locked)
> int migrate_page_move_mapping(struct address_space *mapping,
> struct page *newpage, struct page *page, int extra_count)
> int migrate_huge_page_move_mapping(struct address_space *mapping,
> struct page *newpage, struct page *page)
> void migrate_page_states(struct page *newpage, struct page *page)
> void migrate_page_copy(struct page *newpage, struct page *page)
> int migrate_page(struct address_space *mapping,
> struct page *newpage, struct page *page,
> enum migrate_mode mode)
> int buffer_migrate_page(struct address_space *mapping,
> struct page *newpage, struct page *page, enum migrate_mode mode)
> int buffer_migrate_page_norefs(struct address_space *mapping,
> struct page *newpage, struct page *page, enum migrate_mode mode)
>
> rc = mapping->a_ops->migratepage(mapping, newpage,
> page, mode);
>
> That's a pretty clear preference for (to, from), so I'm going to change
> copy_page_owner() when I convert it to folio_copy_owner(). And I'll
> fix remove_migration_ptes() when i convert that to folios.
IMHO, memcpy() semantics make most sense. So I agree.
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2021-05-10 8:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-07 13:31 Matthew Wilcox
2021-05-10 8:57 ` David Hildenbrand [this message]
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=cd0ae5ed-cbac-f3e0-7fc7-1392a0c7f7de@redhat.com \
--to=david@redhat.com \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
/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