]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: cpu-map: fix thread 1's affinity affecting all threads
authorWilly Tarreau <w@1wt.eu>
Mon, 22 Aug 2022 08:38:00 +0000 (10:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 22 Aug 2022 08:38:00 +0000 (10:38 +0200)
commit3cd71acd0683147add7ce87ce799561ba55d7f7b
tree972c68fa977b67ccf641ed974073eb7106afa0da
parentea4a5cbbdfa71cd287d453dffbdf643846754bba
BUG/MEDIUM: cpu-map: fix thread 1's affinity affecting all threads

Since 2.7-dev2 with commit 5b09341c02 ("MEDIUM: cpu-map: replace the
process number with the thread group number"), the thread group has
replaced the process number in the "cpu-map" directive. In part due to
a design limit in 2.4 and 2.5, a special case was made of thread 1 in
commit bda7c1decd ("MEDIUM: config: simplify cpu-map handling"), because
there was no other location to store a single-threaded setup's mask by
then. The combination of the two resulted in a problem with thread
groups, by which as soon as one line exhibiting thread number 1 alone
was found in a config, the mask would be applied to all threads in the
group.

The loop was reworked to avoid this obsolete special case, and was
factored for better legibility. One obsolete comment about nbproc
was also removed. No backport is needed.
src/cfgparse-global.c