[email protected] writes: > From: Peter Xu <[email protected]> > > The sender thread will yield the p->mutex before IO starts, trying to not > block the requester thread. This may be unnecessary lock optimizations, > because the requester can already read pending_job safely even without the > lock, because the requester is currently the only one who can assign a > task. > > Drop that lock complication on both sides: > > (1) in the sender thread, always take the mutex until job done > (2) in the requester thread, check pending_job clear lockless > > Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
