]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stick-table: move the write lock inside stktable_touch_with_exp()
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Oct 2022 18:17:58 +0000 (18:17 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 12 Oct 2022 12:19:05 +0000 (14:19 +0200)
commit9f5cb435b650b19eba37e438bfde6a8b98a64fb1
treecccd41fe0cd9a307d54287a37591d64dca1b6006
parent4be073b99bb69a871c74dc5ebb55edb664f4b2ed
MINOR: stick-table: move the write lock inside stktable_touch_with_exp()

Taking the write lock prior to entering that function is a problem
because this function is full of conditions that most of the time can
lead to eliminating the lock.

This commit first moves the write lock inside the function and passes
the extra argument required to implement stktable_touch_remote() and
stktable_touch_local(). It also renames the function to remove the
underscores since there's no other variant and it's exported under
this name (probably an old rename that was not propagated). The code
was stressed under 48 threads using 3 trackers on the same table. It
already shows a tiny 3% improvement from 187k to 193k rps.
include/haproxy/stick_table.h
src/stick_table.c