minor tweak to MicroLock slow path
Summary:This diff uses the x86 "pause" instruction or its equivalent when spinning in the MicroLock slow loop. This gives a hint to the processor that it should devote more resources to the other execution contexts sharing the same core. This diff also removes an mfence on x86 by using a slightly stronger memory model on the preceding compare_exchange_weak, and switches to a more portable way of invoking sched_yield(). Reviewed By: dcolascione Differential Revision: D3018568 fb-gh-sync-id: 02e0ab3a9d9bb9901eddf54e45b71cbb7758a227 shipit-source-id: 02e0ab3a9d9bb9901eddf54e45b71cbb7758a227
Showing
Please register or sign in to comment