mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-02-25 18:55:23 -06:00
Remove delay loop from spinlock wait.
Now we halt CPU cores that are going to be idle for a lengthy period, we don't need to try to save power in other ways. And anyway, this was not very effective.
This commit is contained in:
parent
2bf1623733
commit
c23b129e55
@ -22,7 +22,6 @@ static inline void spin_wait(spinlock_t *lock)
|
|||||||
if (lock) {
|
if (lock) {
|
||||||
while (*lock) {
|
while (*lock) {
|
||||||
__builtin_ia32_pause();
|
__builtin_ia32_pause();
|
||||||
for (volatile int i = 0; i < 100; i++) { } // this reduces power consumption
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -36,7 +35,6 @@ static inline void spin_lock(spinlock_t *lock)
|
|||||||
while (!__sync_bool_compare_and_swap(lock, false, true)) {
|
while (!__sync_bool_compare_and_swap(lock, false, true)) {
|
||||||
do {
|
do {
|
||||||
__builtin_ia32_pause();
|
__builtin_ia32_pause();
|
||||||
for (volatile int i = 0; i < 100; i++) { } // this reduces power consumption
|
|
||||||
} while (*lock);
|
} while (*lock);
|
||||||
}
|
}
|
||||||
__sync_synchronize();
|
__sync_synchronize();
|
||||||
|
Loading…
Reference in New Issue
Block a user