Am 29.05.2026 um 03:54 hat Bin Guo geschrieben: > coroutine_pool_refill_local() acquires global_pool_lock on every > call even when the global pool is empty (global_pool_size == 0). > Under high I/O concurrency many threads simultaneously attempt to > refill from an empty global pool, causing unnecessary mutex > contention. > > Add a fast-path check: read global_pool_size with qatomic_read() > before acquiring the mutex. If zero, the global pool is empty and > we return immediately. This is a racy read but correctness is > preserved: the only consequence of a stale read is a missed refill > opportunity, which will be retried on the next coroutine allocation. > > Signed-off-by: Bin Guo <[email protected]>
If you have any benchmark results, putting them in the commit message would be a good idea. (If you don't have them, you should probably get them for a patch that is motivated by performance.) Kevin
