MINOR: task: make grq_total atomic to move it outside of the grq_lock
authorWilly Tarreau <w@1wt.eu>
Thu, 25 Feb 2021 06:51:18 +0000 (07:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 25 Feb 2021 08:44:16 +0000 (09:44 +0100)
commit45499c56d30a00ada0dda5d96fac3bde293d0d5b
treedcc87e7e87b53bc52b796be2f96b743d9b8b9bad
parentc03fbeb3586246852c3757898588aad00fb17bcc
MINOR: task: make grq_total atomic to move it outside of the grq_lock

Instead of decrementing grq_total once per task picked from the global
run queue, let's do it at once after the loop like we do for other
counters. This simplifies the code everywhere. It is not expected to
bring noticeable improvements however, since global tasks tend to be
less common nowadays.
include/haproxy/task.h
src/task.c