[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <44875b14-00ea-4e61-aba7-4809808c4b2a.tianchen.dingtianc@alibaba-inc.com>
Date: Tue, 11 Aug 2020 16:30:31 +0800
From: "丁天琛" <tianchen.dingtianc@...baba-inc.com>
To: "Ingo Molnar" <mingo@...hat.com>,
"Peter Zijlstra" <peterz@...radead.org>,
"Juri Lelli" <juri.lelli@...hat.com>,
"Vincent Guittot" <vincent.guittot@...aro.org>,
"Dietmar Eggemann" <dietmar.eggemann@....com>,
"Steven Rostedt" <rostedt@...dmis.org>,
"Ben Segall" <bsegall@...gle.com>, "Mel Gorman" <mgorman@...e.de>,
"linux-kernel" <linux-kernel@...r.kernel.org>
Cc: "王贇" <yun.wang@...ux.alibaba.com>
Subject: [RFC PATCH] sched/numa: fix bug in update_task_scan_period
When p->numa_faults_locality[2] > 0, numa_scan_period is doubled, but
this array will never be cleared, which causes scanning period always
reaching its max value. This patch clears numa_faults_locality after
numa_scan_period being doubled to fix this bug.
Signed-off-by: Tianchen Ding <tianchen.dingtianc@...baba-inc.com>
Signed-off-by: Michael Wang <yun.wang@...ux.alibaba.com>
---
kernel/sched/fair.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1a68a0536add..a61ee408202e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2180,6 +2180,8 @@ static void update_task_scan_period(struct task_struct *p,
p->mm->numa_next_scan = jiffies +
msecs_to_jiffies(p->numa_scan_period);
+ memset(p->numa_faults_locality, 0,
+ sizeof(p->numa_faults_locality));
return;
}
--
2.25.1
Powered by blists - more mailing lists