[PATCH] psi: reduce min window size to 50ms

From: Sudarshan Rajagopalan
Date: Fri Feb 10 2023 - 17:31:46 EST


Few systems would require much finer-grained tracking of memory
pressure in the system using PSI mechanism. Reduce the minimum
allowable window size to be 50ms to increase the sampling rate
of PSI monitor for much faster response and reaction to memory
pressures in the system. With 50ms window size, the smallest
resolution of memory pressure that can be tracked is now 5ms.

Signed-off-by: Sudarshan Rajagopalan <quic_sudaraja@xxxxxxxxxxx>
---
kernel/sched/psi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
index ee2ecc0..6eabf27 100644
--- a/kernel/sched/psi.c
+++ b/kernel/sched/psi.c
@@ -160,7 +160,7 @@ __setup("psi=", setup_psi);
#define EXP_300s 2034 /* 1/exp(2s/300s) */

/* PSI trigger definitions */
-#define WINDOW_MIN_US 500000 /* Min window size is 500ms */
+#define WINDOW_MIN_US 50000 /* Min window size is 50ms */
#define WINDOW_MAX_US 10000000 /* Max window size is 10s */
#define UPDATES_PER_WINDOW 10 /* 10 updates per window */

--
2.7.4