sched/psi: Avoid resetting the min update period when it is unnecessary
authorYang Yang <yang.yang29@zte.com.cn>
Sun, 14 May 2023 16:33:38 +0000 (09:33 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Sat, 20 May 2023 10:53:16 +0000 (12:53 +0200)
commite2a1f85bf9f509afd09b5d3308e3489b65845c28
tree168e7aa96cf836259c6c1c5986f5d4eb995bf241
parenta6fcdd8d95f7486150b3faadfea119fc3dfc3b74
sched/psi: Avoid resetting the min update period when it is unnecessary

Psi_group's poll_min_period is determined by the minimum window size of
psi_trigger when creating new triggers. While destroying a psi_trigger,
there is no need to reset poll_min_period if the psi_trigger being
destroyed did not have the minimum window size, since in this condition
poll_min_period will remain the same as before.

Signed-off-by: Yang Yang <yang.yang29@zte.com.cn>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Suren Baghdasaryan <surenb@google.com>
Link: https://lkml.kernel.org/r/20230514163338.834345-1-surenb@google.com
kernel/sched/psi.c