Messages in this thread Patch in this message | | | Date | Tue, 11 Aug 2020 16:30:31 +0800 | From | "丁天琛" <> | Subject | [RFC PATCH] sched/numa: fix bug in update task scan pe riod |
| |
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@alibaba-inc.com> Signed-off-by: Michael Wang <yun.wang@linux.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 | |