commit | c460c91633d5407a02f9d3aadf0abece5a4e4b45 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Thu Jun 18 07:28:09 2020 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Thu Jun 18 07:28:09 2020 +0200 |
tree | 23e25f13a742618a0611a7fa98be8a5b99e4194d | |
parent | 7af4fa9a4891bcd55ebccb2e97105f811c6851c8 [diff] |
MEDIUM: fd: refine the fd_takeover() migration lock When haproxy is compiled without double-word CAS, we use a migration lock in fd_takeover(). This lock was covering the atomic OR on the running_mask before checking its value, while it is not needed since this atomic op already returns the result. Let's just refine the code to avoid grabbing the lock in the event another thread has already stolen the FD, this may reduce contention in high reuse rate scenarios.