[v3,13/19] sched/fair: use folio_xchg_last_cpupid() in should_numa_migrate_memory()

Message ID 20231018140806.2783514-14-wangkefeng.wang@huawei.com
State New
Headers
Series mm: convert page cpupid functions to folios |

Commit Message

Kefeng Wang Oct. 18, 2023, 2:08 p.m. UTC
  Convert to use folio_xchg_last_cpupid() in should_numa_migrate_memory().

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index b8c52893b3d9..bafac84f7be9 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1862,7 +1862,7 @@  bool should_numa_migrate_memory(struct task_struct *p, struct folio *folio,
 	}
 
 	this_cpupid = cpu_pid_to_cpupid(dst_cpu, current->pid);
-	last_cpupid = page_cpupid_xchg_last(&folio->page, this_cpupid);
+	last_cpupid = folio_xchg_last_cpupid(folio, this_cpupid);
 
 	if (!(sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING) &&
 	    !node_is_toptier(src_nid) && !cpupid_valid(last_cpupid))