docs: accounting/psi: drop stale 500ms window minimum from trigger docs
PATCH 1/1 docs: accounting/psi: drop stale 500ms window minimum from trigger docs
From: Tao Cui <[email protected]>
psi.rst says trigger windows range "from 500ms to 10s" with a 50ms min polling interval. That minimum was removed in commit 519fabc7aaba ("psi:
remove 500ms min window size limitation for triggers"): the polling-rate protection moved to gating trigger creation behind CAP_SYS_RESOURCE, which also stopped capping psi event latency.
Update the wording accordingly: windows up to 10s with no enforced minimum; trigger creation requires CAP_SYS_RESOURCE on cgroup pressure files, while unprivileged users on /proc/pressure/ are limited to 2s multiples.
--- Documentation/accounting/psi.rst | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
Documentation/accounting/psi.rst +8 -9
@@ -99,15 +99,14 @@ psi metric and deactivates upon exit from the stall state. While system is in the stall state psi signal growth is monitored at a rate of 10 times per tracking window. -The kernel accepts window sizes ranging from 500ms to 10s, therefore min -monitoring update interval is 50ms and max is 1s. Min limit is set to -prevent overly frequent polling. Max limit is chosen as a high enough number -after which monitors are most likely not needed and psi averages can be used -instead. - -Unprivileged users can also create monitors, with the only limitation that the -window size must be a multiple of 2s, in order to prevent excessive resource -usage. +The kernel accepts window sizes up to 10s. The 10s maximum is chosen as a +high enough number after which monitors are most likely not needed and psi +averages can be used instead. + +To prevent excessive resource usage, trigger creation is restricted to +privileged users (CAP_SYS_RESOURCE) on cgroup pressure files; on the +system-wide /proc/pressure/ files unprivileged users can create monitors +as well, limited to window sizes that are a multiple of 2s. When activated, psi monitor stays active for at least the duration of one tracking window to avoid repeated activations/deactivations when system is
Signature · 1 line
2.43.0
Quoted 34 lines · Tao Cui
From: Tao Cui <[email protected]>
psi.rstsays trigger windows range "from 500ms to 10s" with a 50ms min polling interval. That minimum was removed in commit519fabc7aaba("psi:
remove 500ms min window size limitation for triggers"): the polling-rate protection moved to gating trigger creation behindCAP_SYS_RESOURCE, which also stopped capping psi event latency.Update the wording accordingly: windows up to 10s with no enforced minimum; trigger creation requires
CAP_SYS_RESOURCEon cgroup pressure files, while unprivileged users on/proc/pressure/are limited to 2s multiples.Signed-off-by Tao Cui <[email protected]>--- Documentation/accounting/psi.rst | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)Documentation/accounting/psi.rst +0
-7@@ -99,15 +99,14 @@ psi metric and deactivates upon exit from the stall state. While system is in the stall state psi signal growth is monitored at a rate of 10 times per tracking window. -The kernel accepts window sizes ranging from 500ms to 10s, therefore min -monitoring update interval is 50ms and max is 1s. Min limit is set to -prevent overly frequent polling. Max limit is chosen as a high enough number -after which monitors are most likely not needed and psi averages can be used -instead. - -Unprivileged users can also create monitors, with the only limitation that the
Documentation/accounting/psi.rst psi metric and deactivates upon exit from the stall state. While system is · line 109
Quoted 10 lines
Documentation/accounting/psi.rst +8
-2-window size must be a multiple of 2s, in order to prevent excessive resource -usage. +The kernel accepts window sizes up to 10s. The 10s maximum is chosen as a +high enough number after which monitors are most likely not needed and psi +averages can be used instead. + +To prevent excessive resource usage, trigger creation is restricted to +privileged users (CAP_SYS_RESOURCE) on cgroup pressure files; on the +system-wide /proc/pressure/ files unprivileged users can create monitors +as well, limited to window sizes that are a multiple of 2s.
Hmm. From this wording it sounds like we have different trigger creation rules for system-wide vs cgroup pressure files, which I think is not true. AFAICT, for both types, we restrict unprivileged users to creating triggers with 2s window size multiples.
Quoted 6 lines
Documentation/accounting/psi.rst +0
-1When activated, psi monitor stays active for at least the duration of one tracking window to avoid repeated activations/deactivations when system is --2.43.0
Quoted 42 lines · Suren Baghdasaryan
Quoted 41 lines · Tao Cui
From: Tao Cui <[email protected]>
psi.rstsays trigger windows range "from 500ms to 10s" with a 50ms min polling interval. That minimum was removed in commit519fabc7aaba("psi:
remove 500ms min window size limitation for triggers"): the polling-rate protection moved to gating trigger creation behindCAP_SYS_RESOURCE, which also stopped capping psi event latency.Update the wording accordingly: windows up to 10s with no enforced minimum; trigger creation requires
CAP_SYS_RESOURCEon cgroup pressure files, while unprivileged users on/proc/pressure/are limited to 2s multiples.Signed-off-by Tao Cui <[email protected]>--- Documentation/accounting/psi.rst | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)Documentation/accounting/psi.rst +5
-9@@ -99,15 +99,14 @@ psi metric and deactivates upon exit from the stall state. While system is in the stall state psi signal growth is monitored at a rate of 10 times per tracking window. -The kernel accepts window sizes ranging from 500ms to 10s, therefore min -monitoring update interval is 50ms and max is 1s. Min limit is set to -prevent overly frequent polling. Max limit is chosen as a high enough number -after which monitors are most likely not needed and psi averages can be used -instead. - -Unprivileged users can also create monitors, with the only limitation that the -window size must be a multiple of 2s, in order to prevent excessive resource -usage. +The kernel accepts window sizes up to 10s. The 10s maximum is chosen as a +high enough number after which monitors are most likely not needed and psi +averages can be used instead. + +To prevent excessive resource usage, trigger creation is restricted to
Quoted 9 lines
Documentation/accounting/psi.rst psi metric and deactivates upon exit from the stall state. While system is · line 109
Quoted 3 lines
Documentation/accounting/psi.rst +3
-0+privileged users (CAP_SYS_RESOURCE) on cgroup pressure files; on the +system-wide /proc/pressure/ files unprivileged users can create monitors +as well, limited to window sizes that are a multiple of 2s.Hmm. From this wording it sounds like we have different trigger creation rules for system-wide vs cgroup pressure files, which I think is not true. AFAICT, for both types, we restrict unprivileged users to creating triggers with 2s window size multiples.
Sorry, I missed part of the history here. 8b39d20eceed reverted the cgroup-specific gating that 519fabc7aaba added, so the 2s-multiple rule applies the same way to both system-wide and cgroup files. I'll send a v2 that keeps the window-range fix but restores the original unified wording.
Thanks,
Tao
Quoted 6 lines
Quoted 6 lines
Documentation/accounting/psi.rst +0
-1When activated, psi monitor stays active for at least the duration of one tracking window to avoid repeated activations/deactivations when system is --2.43.0