[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aa636851c3aab82f2e5f90b0be0ba540672e8178.1693287931.git.raghavendra.kt@amd.com>
Date: Tue, 29 Aug 2023 11:36:09 +0530
From: Raghavendra K T <raghavendra.kt@....com>
To: <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>
CC: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
"Mel Gorman" <mgorman@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
"David Hildenbrand" <david@...hat.com>, <rppt@...nel.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Bharata B Rao <bharata@....com>,
Aithal Srikanth <sraithal@....com>,
"kernel test robot" <oliver.sang@...el.com>,
Raghavendra K T <raghavendra.kt@....com>,
Sapkal Swapnil <Swapnil.Sapkal@....com>,
K Prateek Nayak <kprateek.nayak@....com>
Subject: [RFC PATCH V1 1/6] sched/numa: Move up the access pid reset logic
otherwise VMA's access pid clearing could get deferred for
a long time when tasks return without scanning.
Suggested-by: Mel Gorman <mgorman@...hsingularity.net>
Signed-off-by: Raghavendra K T <raghavendra.kt@....com>
---
kernel/sched/fair.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index b3e25be58e2b..2f2e1568c1d4 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3068,14 +3068,7 @@ static void task_numa_work(struct callback_head *work)
vma->numab_state->next_scan))
continue;
- /* Do not scan the VMA if task has not accessed */
- if (!vma_is_accessed(vma))
- continue;
-
- /*
- * RESET access PIDs regularly for old VMAs. Resetting after checking
- * vma for recent access to avoid clearing PID info before access..
- */
+ /* RESET access PIDs regularly for old VMAs. */
if (mm->numa_scan_seq &&
time_after(jiffies, vma->numab_state->next_pid_reset)) {
vma->numab_state->next_pid_reset = vma->numab_state->next_pid_reset +
@@ -3084,6 +3077,10 @@ static void task_numa_work(struct callback_head *work)
vma->numab_state->access_pids[1] = 0;
}
+ /* Do not scan the VMA if task has not accessed */
+ if (!vma_is_accessed(vma))
+ continue;
+
do {
start = max(start, vma->vm_start);
end = ALIGN(start + (pages << PAGE_SHIFT), HPAGE_SIZE);
--
2.34.1
Powered by blists - more mailing lists