Re: [PATCH 1/2] rust: sync: add `CondVar::notify_sync`

From: Martin Rodriguez Reboredo
Date: Wed Dec 06 2023 - 10:53:38 EST


On 12/6/23 07:09, Alice Ryhl wrote:
Wake up another thread synchronously.

This method behaves like `notify_one`, except that it hints to the
scheduler that the current thread is about to go to sleep, so it should
schedule the target thread on the same CPU.

This is used by Rust Binder as a performance optimization. When sending
a transaction to a different process, we usually know which thread will
handle it, so we can schedule that thread for execution next on this
CPU for better cache locality.

Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
---
[...]
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx>