diff mbox series

[RFC,V1,3/6] sched/numa: Remove unconditional scan logic using mm numa_scan_seq

Message ID e8269f757a9167579ef61f7f4802d30352ce4a9a.1693287931.git.raghavendra.kt@amd.com (mailing list archive)
State New
Headers show
Series sched/numa: Enhance disjoint VMA scanning | expand

Commit Message

Raghavendra K T Aug. 29, 2023, 6:06 a.m. UTC
It is now redundant after unconditional scans introduced for tasks'
disjoint VMAs.

Also this approach was not considering a rare case where a VMA gets
created after mm numa_scan_seq is greater than two.

Signed-off-by: Raghavendra K T <raghavendra.kt@amd.com>
---
 kernel/sched/fair.c | 8 --------
 1 file changed, 8 deletions(-)
diff mbox series

Patch

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 23375c10f36e..e26e847a8e26 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2961,14 +2961,6 @@  static bool task_disjoint_vma_select(struct vm_area_struct *vma)
 static bool vma_is_accessed(struct vm_area_struct *vma)
 {
 	unsigned long pids;
-	/*
-	 * Allow unconditional access first two times, so that all the (pages)
-	 * of VMAs get prot_none fault introduced irrespective of accesses.
-	 * This is also done to avoid any side effect of task scanning
-	 * amplifying the unfairness of disjoint set of VMAs' access.
-	 */
-	if (READ_ONCE(current->mm->numa_scan_seq) < 2)
-		return true;
 
 	pids = vma->numab_state->access_pids[0] | vma->numab_state->access_pids[1];
 	return test_bit(hash_32(current->pid, ilog2(BITS_PER_LONG)), &pids);