All of lore.kernel.org
 help / color / mirror / Atom feed
* Migrate (from, to) or (to, from)?
@ 2021-05-07 13:31 Matthew Wilcox
  2021-05-10  8:57 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2021-05-07 13:31 UTC (permalink / raw)
  To: linux-mm


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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Migrate (from, to) or (to, from)?
  2021-05-07 13:31 Migrate (from, to) or (to, from)? Matthew Wilcox
@ 2021-05-10  8:57 ` David Hildenbrand
  0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2021-05-10  8:57 UTC (permalink / raw)
  To: Matthew Wilcox, linux-mm

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-10  8:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 13:31 Migrate (from, to) or (to, from)? Matthew Wilcox
2021-05-10  8:57 ` David Hildenbrand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.