Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'linux-cpupower-6.12-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shuah/linux

Merge a cpupower utility update for 6.12 from Shuah Khan:

"This cpupower update for Linux 6.12-rc1 consists of an enhancement
to cpuidle tool to display the residency value of cpuidle states.
This addition provides a clearer and more detailed view of idle
state information when using cpuidle-info."

* tag 'linux-cpupower-6.12-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shuah/linux:
tools/cpupower: display residency value in idle-info

+14
+8
tools/power/cpupower/lib/cpuidle.c
··· 116 116 IDLESTATE_USAGE, 117 117 IDLESTATE_POWER, 118 118 IDLESTATE_LATENCY, 119 + IDLESTATE_RESIDENCY, 119 120 IDLESTATE_TIME, 120 121 IDLESTATE_DISABLE, 121 122 MAX_IDLESTATE_VALUE_FILES ··· 126 125 [IDLESTATE_USAGE] = "usage", 127 126 [IDLESTATE_POWER] = "power", 128 127 [IDLESTATE_LATENCY] = "latency", 128 + [IDLESTATE_RESIDENCY] = "residency", 129 129 [IDLESTATE_TIME] = "time", 130 130 [IDLESTATE_DISABLE] = "disable", 131 131 }; ··· 254 252 unsigned int idlestate) 255 253 { 256 254 return cpuidle_state_get_one_value(cpu, idlestate, IDLESTATE_LATENCY); 255 + } 256 + 257 + unsigned long cpuidle_state_residency(unsigned int cpu, 258 + unsigned int idlestate) 259 + { 260 + return cpuidle_state_get_one_value(cpu, idlestate, IDLESTATE_RESIDENCY); 257 261 } 258 262 259 263 unsigned long cpuidle_state_usage(unsigned int cpu,
+2
tools/power/cpupower/lib/cpuidle.h
··· 8 8 unsigned int disable); 9 9 unsigned long cpuidle_state_latency(unsigned int cpu, 10 10 unsigned int idlestate); 11 + unsigned long cpuidle_state_residency(unsigned int cpu, 12 + unsigned int idlestate); 11 13 unsigned long cpuidle_state_usage(unsigned int cpu, 12 14 unsigned int idlestate); 13 15 unsigned long long cpuidle_state_time(unsigned int cpu,
+4
tools/power/cpupower/utils/cpuidle-info.c
··· 64 64 65 65 printf(_("Latency: %lu\n"), 66 66 cpuidle_state_latency(cpu, idlestate)); 67 + printf(_("Residency: %lu\n"), 68 + cpuidle_state_residency(cpu, idlestate)); 67 69 printf(_("Usage: %lu\n"), 68 70 cpuidle_state_usage(cpu, idlestate)); 69 71 printf(_("Duration: %llu\n"), ··· 117 115 printf(_("promotion[--] demotion[--] ")); 118 116 printf(_("latency[%03lu] "), 119 117 cpuidle_state_latency(cpu, cstate)); 118 + printf(_("residency[%05lu] "), 119 + cpuidle_state_residency(cpu, cstate)); 120 120 printf(_("usage[%08lu] "), 121 121 cpuidle_state_usage(cpu, cstate)); 122 122 printf(_("duration[%020Lu] \n"),