path: root/include/linux/psi_types.h
diff options
authorZhaoyang Huang <zhaoyang.huang@unisoc.com>2022-01-25 14:56:58 +0800
committerPeter Zijlstra <peterz@infradead.org>2022-02-16 15:57:54 +0100
commite6df4ead85d9da1b07dd40bd4c6d2182f3e210c4 (patch)
tree1af29301a0595cc3d539c7927b31d41e6a5812ce /include/linux/psi_types.h
parentsched/numa: Avoid migrating task to CPU-less node (diff)
psi: fix possible trigger missing in the window
When a new threshold breaching stall happens after a psi event was generated and within the window duration, the new event is not generated because the events are rate-limited to one per window. If after that no new stall is recorded then the event will not be generated even after rate-limiting duration has passed. This is happening because with no new stall, window_update will not be called even though threshold was previously breached. To fix this, record threshold breaching occurrence and generate the event once window duration is passed. Suggested-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Suren Baghdasaryan <surenb@google.com> Link: https://lore.kernel.org/r/1643093818-19835-1-git-send-email-huangzhaoyang@gmail.com
Diffstat (limited to '')
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/psi_types.h b/include/linux/psi_types.h
index 516c0fe836fd..dc3ec5e4b9ee 100644
--- a/include/linux/psi_types.h
+++ b/include/linux/psi_types.h
@@ -144,6 +144,9 @@ struct psi_trigger {
/* Refcounting to prevent premature destruction */
struct kref refcount;
+ /* Deferred event(s) from previous ratelimit window */
+ bool pending_event;
struct psi_group {