Skip to content

Commit f2ac428

Browse files
npigginmpe
authored andcommitted
powerpc/pseries/cpuidle: add polling idle for shared processor guests
For shared processor guests (e.g., KVM), add an idle polling mode rather than immediately returning to the hypervisor when the guest CPU goes idle. Test setup is a 2 socket POWER9 with 4 guests running, each with vCPUs equal to 1/2 of real of CPUs. Saturated each guest with tbench. Using polling idle gives about 1.4x throughput. Kernel compile speed was not changed significantly. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent ced54c0 commit f2ac428

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎drivers/cpuidle/cpuidle-pseries.c‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,17 @@ static struct cpuidle_state dedicated_states[] = {
174174
* States for shared partition case.
175175
*/
176176
static struct cpuidle_state shared_states[] = {
177+
{ /* Snooze */
178+
.name = "snooze",
179+
.desc = "snooze",
180+
.exit_latency = 0,
181+
.target_residency = 0,
182+
.enter = &snooze_loop },
177183
{ /* Shared Cede */
178184
.name = "Shared Cede",
179185
.desc = "Shared Cede",
180-
.exit_latency = 0,
181-
.target_residency = 0,
186+
.exit_latency = 10,
187+
.target_residency = 100,
182188
.enter = &shared_cede_loop },
183189
};
184190

0 commit comments

Comments
 (0)