MINOR: freq_ctr: add cpu_relax in the rotation loop of update_freq_ctr_period()
authorWilly Tarreau <w@1wt.eu>
Sat, 10 Apr 2021 23:18:39 +0000 (01:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 11 Apr 2021 09:12:57 +0000 (11:12 +0200)
commit6339c19cacb2010d2bf71066e436f5cc27252746
tree0fed5531abb8d4e2b78aaa5e54e79d43886b4278
parentfc6323ad82742f8d686d953420757e5446d34f5d
MINOR: freq_ctr: add cpu_relax in the rotation loop of update_freq_ctr_period()

When counters are rotated, there is contention between the threads which
can slow down the operation of the thread performing the rotation. Let's
apply a cpu_relax there to let the first thread finish faster.
include/haproxy/freq_ctr.h