]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: time: avoid unneeded updates to now_offset
authorWilly Tarreau <w@1wt.eu>
Fri, 23 Apr 2021 13:17:27 +0000 (15:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 23 Apr 2021 16:03:06 +0000 (18:03 +0200)
commit481795de1348d939d01c3ec12e317ad51d0d0cca
treeb9566470fcb59afe09a0512cd8229ebd0cd1b707
parenta6f9c5d2a71375debaf4d3152ea8102ab97dd539
MINOR: time: avoid unneeded updates to now_offset

The time adjustment is very rare, even at high pool rates. Tests show
that only 0.2% of tv_update_date() calls require a change of offset. Such
concurrent writes to a shared variable have an important impact on future
loads, so let's only update the variable if it changed.
src/time.c