Skip to content

Commit

Permalink
kernel: enable pressure interface
Browse files Browse the repository at this point in the history
PSI provides a canonical way to see resource pressure increases as
they develop, with pressure metrics for three major resources:
memory, CPU, and IO. PSI stats are like barometers that provide
fair warning of impending resource shortages, enabling users to
take more proactive, granular, and nuanced steps when resources
start becoming scarce.

References:
* https://www.kernel.org/doc/html/latest/accounting/psi.html
* https://lwn.net/Articles/759781/

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000
Run-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000

Signed-off-by: John Audia <[email protected]>
Link: openwrt/openwrt#13819
Signed-off-by: Hauke Mehrtens <[email protected]>
  • Loading branch information
graysky2 authored and hauke committed Nov 24, 2024
1 parent d413163 commit eed39d4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions config/Config-kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,25 @@ if KERNEL_TASKSTATS

endif

config KERNEL_PSI
bool "Compile the kernel with pressure stall information tracking"
help
Collect metrics that indicate how overcommitted the CPU, memory,
and IO capacity are in the system.

If you say Y here, the kernel will create /proc/pressure/ with the
pressure statistics files cpu, memory, and io. These will indicate
the share of walltime in which some or all tasks in the system are
delayed due to contention of the respective resource.

In kernels with cgroup support, cgroups (cgroup2 only) will
have cpu.pressure, memory.pressure, and io.pressure files,
which aggregate pressure stalls for the grouped tasks only.

For more details see Documentation/accounting/psi.rst.

Say N if unsure.

config KERNEL_KALLSYMS
bool "Compile the kernel with symbol table information"
default y if !SMALL_FLASH
Expand Down
1 change: 1 addition & 0 deletions target/linux/generic/config-6.6
Original file line number Diff line number Diff line change
Expand Up @@ -4758,6 +4758,7 @@ CONFIG_PROC_SYSCTL=y
# CONFIG_PSB6970_PHY is not set
# CONFIG_PSE_CONTROLLER is not set
# CONFIG_PSI is not set
# CONFIG_PSI_DEFAULT_DISABLED is not set
# CONFIG_PSTORE is not set
# CONFIG_PSTORE_BLK is not set
# CONFIG_PSTORE_COMPRESS is not set
Expand Down

0 comments on commit eed39d4

Please sign in to comment.