[-next,v2,13/19] sched/fair: use folio_xchg_last_cpupid() in should_numa_migrate_memory()

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

Commit Message

Kefeng Wang Oct. 13, 2023, 8:55 a.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 bc07f29a4a42..f3cb4c8974c5 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))