diff options
author | Chengming Zhou <zhouchengming@bytedance.com> | 2022-08-26 00:41:08 +0800 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-09-09 11:08:32 +0200 |
commit | 52b1364ba0b105122d6de0e719b36db705011ac1 (patch) | |
tree | a6601f432fbe2c006addc068eab9b98febf0449c /include | |
parent | 71dbdde7914d32e86f01ac1f6e54e964c9dfdbd9 (diff) | |
download | linux-stable-52b1364ba0b105122d6de0e719b36db705011ac1.tar.gz linux-stable-52b1364ba0b105122d6de0e719b36db705011ac1.tar.bz2 linux-stable-52b1364ba0b105122d6de0e719b36db705011ac1.zip |
sched/psi: Add PSI_IRQ to track IRQ/SOFTIRQ pressure
Now PSI already tracked workload pressure stall information for
CPU, memory and IO. Apart from these, IRQ/SOFTIRQ could have
obvious impact on some workload productivity, such as web service
workload.
When CONFIG_IRQ_TIME_ACCOUNTING, we can get IRQ/SOFTIRQ delta time
from update_rq_clock_task(), in which we can record that delta
to CPU curr task's cgroups as PSI_IRQ_FULL status.
Note we don't use PSI_IRQ_SOME since IRQ/SOFTIRQ always happen in
the current task on the CPU, make nothing productive could run
even if it were runnable, so we only use PSI_IRQ_FULL.
Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Link: https://lore.kernel.org/r/20220825164111.29534-8-zhouchengming@bytedance.com
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/psi_types.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/psi_types.h b/include/linux/psi_types.h index 54cb74946db4..40c28171cd91 100644 --- a/include/linux/psi_types.h +++ b/include/linux/psi_types.h @@ -42,7 +42,10 @@ enum psi_res { PSI_IO, PSI_MEM, PSI_CPU, - NR_PSI_RESOURCES = 3, +#ifdef CONFIG_IRQ_TIME_ACCOUNTING + PSI_IRQ, +#endif + NR_PSI_RESOURCES, }; /* @@ -58,9 +61,12 @@ enum psi_states { PSI_MEM_FULL, PSI_CPU_SOME, PSI_CPU_FULL, +#ifdef CONFIG_IRQ_TIME_ACCOUNTING + PSI_IRQ_FULL, +#endif /* Only per-CPU, to weigh the CPU in the global average: */ PSI_NONIDLE, - NR_PSI_STATES = 7, + NR_PSI_STATES, }; /* Use one bit in the state mask to track TSK_ONCPU */ |