]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: freq_ctr: add opportunistic versions of swrate_add()
authorWilly Tarreau <w@1wt.eu>
Mon, 19 Dec 2022 16:19:45 +0000 (17:19 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Dec 2022 13:51:12 +0000 (14:51 +0100)
commite327b4a73e3ac5fce223aa34d1ed293ad8a57cf4
tree4304712031dd5e9aeed6e039a1a5e2be708e7aad
parent284cfc67b887e6a6e92271c863b129b1c0f37845
MINOR: freq_ctr: add opportunistic versions of swrate_add()

Some uses of swrate_add() only consist in getting a rough estimate of
a frequency. There are cases where speed matters more than accuracy
(e.g. pools). For such use cases, let's just stop looping on the CAS,
if the update fails, another thread is already providing input, and
it's not dramatic to lose the race. All these functions are now
suffixed with "_opportunistic".
include/haproxy/freq_ctr.h