mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
x86_cstates: Call arch_cpu_pause() if wait is disabled.
This wait() routine is called by cpu_wait(), which is what spinlocks use in their critical loops. If there is no CPU idle module, then cpu_wait() just calls arch_cpu_pause(). As "wait" is only enabled in power-saving mode, we should do the same here to retain the same behavior (and potentially save some power even in "high-performance" mode.) Tested on bare metal; performance difference for a compile job (while on battery) may be 5% lower, or that could just be noise.
This commit is contained in:
parent
724227e017
commit
aa49539d5f
@ -109,8 +109,10 @@ cstates_idle(void)
|
||||
static void
|
||||
cstates_wait(int32* variable, int32 test)
|
||||
{
|
||||
if (!sEnableWait)
|
||||
if (!sEnableWait) {
|
||||
arch_cpu_pause();
|
||||
return;
|
||||
}
|
||||
|
||||
InterruptsLocker _;
|
||||
x86_monitor(variable, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user