> @@ -2317,8 +2319,8 @@ int mpol_misplaced(struct page *page, struct > vm_area_struct *vma, unsigned long > * it less likely we act on an unlikely task<->page > * relation. > */ > - last_nid = page_nid_xchg_last(page, polnid); > - if (last_nid != polnid) > + last_nidpid = page_nidpid_xchg_last(page, this_nidpid); > + if (!nidpid_pid_unset(last_nidpid) && > nidpid_to_nid(last_nidpid) != polnid) > goto out; > } > > Suppose that the first accessed page it will check the "if (curnid != polnid)" and maybe migrate the page later. so maybe modify like that: + last_nidpid = page_nidpid_xchg_last(page, this_nidpid); + if (nidpid_pid_unset(last_nidpid)) + goto out; + else if (nidpid_to_nid(last_nidpid) != polnid) goto out; Best, Figo.zhang