]> git.baikalelectronics.ru Git - kernel.git/commit
psi: Fix trigger being fired unexpectedly at initial
authorHailong Liu <liuhailong@linux.alibaba.com>
Fri, 1 Apr 2022 05:10:11 +0000 (13:10 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 22 Apr 2022 10:14:06 +0000 (12:14 +0200)
commit8d15d1bd947565f6eefe081552713d9e9a52feb1
tree8cbb635a259d91071f8d744bc43fe2c704d46cfe
parent08611378fd95b02d27e6972ee261d6b2b60a6944
psi: Fix trigger being fired unexpectedly at initial

When a trigger being created, its win.start_value and win.start_time are
reset to zero. If group->total[PSI_POLL][t->state] has accumulated before,
this trigger will be fired unexpectedly in the next period, even if its
growth time does not reach its threshold.

So set the window of the new trigger to the current state value.

Signed-off-by: Hailong Liu <liuhailong@linux.alibaba.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Suren Baghdasaryan <surenb@google.com>
Link: https://lore.kernel.org/r/1648789811-3788971-1-git-send-email-liuhailong@linux.alibaba.com
kernel/sched/psi.c