diff options
author | David Goulet <dgoulet@torproject.org> | 2022-11-23 13:47:59 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2022-11-23 14:05:10 -0500 |
commit | fbc9e92fdb364a741a3190fc22c6fa65d90e92e3 (patch) | |
tree | 83f00a66b54dc942743811d0ea6a206a653a8686 /changes | |
parent | cca19a40991f1b6df7586b5c9f5491989ee54bca (diff) | |
download | tor-fbc9e92fdb364a741a3190fc22c6fa65d90e92e3.tar.gz tor-fbc9e92fdb364a741a3190fc22c6fa65d90e92e3.zip |
relay: Use the configured number of threads for worker work calculation
We cap our number of CPU worker threads to at least 2 even if we have a
single core. But also, before we used to always add one extra thread
regardless of the number of core.
This meant that we were off when re-using the get_num_cpus() function
when calculating our onionskin work overhead because we were always off
by one.
This commit makes it that we always use the number of thread our actual
thread pool was configured with.
Fixes #40719
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'changes')
-rw-r--r-- | changes/ticket40719 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/changes/ticket40719 b/changes/ticket40719 new file mode 100644 index 0000000000..eec84dce0f --- /dev/null +++ b/changes/ticket40719 @@ -0,0 +1,3 @@ + o Minor bugfixes (cpuworker, relay): + - Fix an off by one overload calculation on the number of CPUs being used by + our thread pool. Fixes bug 40719; bugfix on 0.3.5.1-alpha. |