]> www.infradead.org Git - users/jedix/linux-maple.git/commit
intel_idle: Add C1 demotion on/off sysfs knob
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 17 Mar 2025 13:55:39 +0000 (15:55 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 15 Apr 2025 18:38:26 +0000 (20:38 +0200)
commit6138f34515162340520b0415184367e12775f68a
tree4f5ce26f64225f40b71847c2886403268163c46d
parentaf5376a77e8759084a9a135f50761607fea31743
intel_idle: Add C1 demotion on/off sysfs knob

Add a sysfs knob to enable/disable C1 demotion for the following Intel
platforms: Sapphire Rapids Xeon, Emerald Rapids Xeon, Granite Rapids Xeon,
Sierra Forest Xeon, and Grand Ridge SoC.

This sysfs file shows up as
"/sys/devices/system/cpu/cpuidle/intel_c1_demotion".

The C1 demotion feature involves the platform firmware demoting deep
C-state requests from the OS (e.g., C6 requests) to C1. The idea is
that firmware monitors CPU wake-up rate, and if it is higher than a
platform-specific threshold, the firmware demotes deep C-state
requests to C1. For example, Linux requests C6, but firmware noticed
too many wake-ups per second, and it keeps the CPU in C1. When the
CPU stays in C1 long enough, the platform promotes it back to C6.

The default value for C1 demotion is whatever is configured by BIOS.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Link: https://patch.msgid.link/20250317135541.1471754-2-dedekind1@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/idle/intel_idle.c