mirror of
https://github.com/memtest86plus/memtest86plus
synced 2025-03-13 17:33:14 +03: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) {
|
||||
while (*lock) {
|
||||
__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)) {
|
||||
do {
|
||||
__builtin_ia32_pause();
|
||||
for (volatile int i = 0; i < 100; i++) { } // this reduces power consumption
|
||||
} while (*lock);
|
||||
}
|
||||
__sync_synchronize();
|
||||
|
Loading…
x
Reference in New Issue
Block a user