Commit 0f08a380 authored by Nanyong Sun's avatar Nanyong Sun
Browse files

mm: numa-affinity: delete the duplicate numa_migrate_prep

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IAFONL


CVE: NA

--------------------------------

Now the numa_migrate_prep() is not static in mm core, we
can delete the duplicate one here.

Signed-off-by: default avatarNanyong Sun <sunnanyong@huawei.com>
parent 3bf61035
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -129,22 +129,6 @@ static void mem_sampling_process(struct mem_sampling_record *record_base, int nr
}

#ifdef CONFIG_NUMABALANCING_MEM_SAMPLING

static int numa_migrate_prep(struct page *page, struct vm_area_struct *vma,
				unsigned long addr, int page_nid,
				int *flags)
{
	get_page(page);

	count_vm_numa_event(NUMA_HINT_FAULTS);
	if (page_nid == numa_node_id()) {
		count_vm_numa_event(NUMA_HINT_FAULTS_LOCAL);
		*flags |= TNF_FAULT_LOCAL;
	}

	return mpol_misplaced(page, vma, addr);
}

static inline void do_thp_numa_access(struct mm_struct *mm,
				      struct vm_area_struct *vma,
				      u64 vaddr, struct page *page)