mm/page_owner: convert set_page_owner_migrate_reason() to folios
Subsystems (5)
PATCH 1/1 mm/page_owner: convert set_page_owner_migrate_reason() to folios
Both callers of set_page_owner_migrate_reason() use folios. Convert the function to take a folio directly and move the &folio->page conversion inside __set_page_owner_migrate_reason().
--- include/linux/page_owner.h | 8 ++++---- mm/hugetlb.c | 2 +- mm/migrate.c | 2 +- mm/page_owner.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
include/linux/page_owner.h +4 -4
@@ -14,7 +14,7 @@ extern void __set_page_owner(struct page *page,extern void __split_page_owner (struct page *page,int old_order,int new_order);extern void __folio_copy_owner (struct folio *newfolio,struct folio *old); -extern void __set_page_owner_migrate_reason (struct page *page,int reason); +extern void __folio_set_owner_migrate_reason (struct folio *folio,int reason);extern void __dump_page_owner (const struct page *page);extern void pagetypeinfo_showmixedcount_print (struct seq_file *m,pg_data_t *pgdat,struct zone *zone);
@@ -43,10 +43,10 @@ static inline void folio_copy_owner(struct folio *newfolio, struct folio *old)if (static_branch_unlikely (&page_owner_inited))__folio_copy_owner (newfolio, old); } -static inline void set_page_owner_migrate_reason (struct page *page,int reason) +static inline void folio_set_owner_migrate_reason (struct folio *folio,int reason) {if (static_branch_unlikely (&page_owner_inited)) -__set_page_owner_migrate_reason (page, reason); +__folio_set_owner_migrate_reason (folio, reason); }static inline void dump_page_owner (const struct page *page) {
@@ -68,7 +68,7 @@ static inline void split_page_owner(struct page *page, int old_order,static inline void folio_copy_owner (struct folio *newfolio,struct folio *folio) { } -static inline void set_page_owner_migrate_reason (struct page *page,int reason) +static inline void folio_set_owner_migrate_reason (struct folio *folio,int reason) { }static inline void dump_page_owner (const struct page *page)
mm/hugetlb.c +1 -1
@@ -7835,7 +7835,7 @@ void move_hugetlb_state(struct folio *old_folio, struct folio *new_folio, int restruct hstate *h =folio_hstate (old_folio);hugetlb_cgroup_migrate (old_folio, new_folio); -set_page_owner_migrate_reason (&new_folio->page, reason); +folio_set_owner_migrate_reason (new_folio, reason);/* * transfer temporary state of the new hugetlb folio. This is
mm/migrate.c +1 -1
@@ -1367,7 +1367,7 @@ static int migrate_folio_move(free_folio_t put_new_folio, unsigned long private, out_unlock_both:folio_unlock (dst); -set_page_owner_migrate_reason (&dst->page, reason); +folio_set_owner_migrate_reason (dst, reason);/* * If migration is successful, decrease refcount of dst, * which will not free the page because new page owner increased
mm/page_owner.c +2 -2
@@ -333,9 +333,9 @@ noinline void __set_page_owner(struct page *page, unsigned short order,inc_stack_record_count (handle, gfp_mask,1 << order); } -void __set_page_owner_migrate_reason (struct page *page,int reason) +void __folio_set_owner_migrate_reason (struct folio *folio,int reason) { -struct page_ext *page_ext =page_ext_get (page); +struct page_ext *page_ext =page_ext_get (&folio->page);struct page_owner *page_owner;if (unlikely (!page_ext))
Signature · 1 line
2.43.0
Quoted 5 lines · Sidhartha Kumar
Both callers of
set_page_owner_migrate_reason()use folios. Convert the function to take a folio directly and move the&folio->pageconversion inside__set_page_owner_migrate_reason().Signed-off-by Sidhartha Kumar <[email protected]>
Quoted 6 lines · Sidhartha Kumar
Both callers of
set_page_owner_migrate_reason()use folios. Convert the function to take a folio directly and move the&folio->pageconversion inside__set_page_owner_migrate_reason().Signed-off-by Sidhartha Kumar <[email protected]>---
Signature · 3 lines
Cheers, David / dhildenb
Quoted 4 lines · Sidhartha Kumar
Both callers of
set_page_owner_migrate_reason()use folios. Convert the function to take a folio directly and move the&folio->pageconversion inside__set_page_owner_migrate_reason().
Quoted 8 lines
Signed-off-by Sidhartha Kumar <[email protected]>--- include/linux/page_owner.h | 8 ++++---- mm/hugetlb.c | 2 +- mm/migrate.c | 2 +- mm/page_owner.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
Best Regards,
Yan, Zi
Quoted 6 lines · Sidhartha Kumar
Both callers of
set_page_owner_migrate_reason()use folios. Convert the function to take a folio directly and move the&folio->pageconversion inside__set_page_owner_migrate_reason().Signed-off-by Sidhartha Kumar <[email protected]>---
Quoted 5 lines · Sidhartha Kumar
Both callers of
set_page_owner_migrate_reason()use folios. Convert the function to take a folio directly and move the&folio->pageconversion inside__set_page_owner_migrate_reason().Signed-off-by Sidhartha Kumar <[email protected]>
Signature · 2 lines
Oscar Salvador SUSE Labs