aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-11-09 12:49:23 -0500
committerDavid Goulet <dgoulet@torproject.org>2022-11-09 13:13:21 -0500
commite3f6908984c6f2e6361a1a15f37d6bb0647efda9 (patch)
treec7afb64fa267fb53625ff9f56e32dac178368a55 /src/lib
parent9c8c7804d535b4248e7e029c969d9a77a54947f6 (diff)
downloadtor-e3f6908984c6f2e6361a1a15f37d6bb0647efda9.tar.gz
tor-e3f6908984c6f2e6361a1a15f37d6bb0647efda9.zip
relay: Make the max pending tasks per CPU a consensus parameter
Until now, there was this magic number (64) used as the maximum number of tasks a CPU worker can take at once. This commit makes it a consensus parameter so our future selves can think of a better value depending on network conditions. Part of #40704 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/thread/numcpus.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/thread/numcpus.c b/src/lib/thread/numcpus.c
index e0ddb69931..40fac7dbe4 100644
--- a/src/lib/thread/numcpus.c
+++ b/src/lib/thread/numcpus.c
@@ -53,10 +53,10 @@ compute_num_cpus_impl(void)
cpus = cpus_onln;
} else if (cpus_onln > 0 && cpus_conf > 0) {
if (cpus_onln < cpus_conf) {
- log_notice(LD_GENERAL, "I think we have %ld CPUS, but only %ld of them "
- "are available. Telling Tor to only use %ld. You can over"
- "ride this with the NumCPUs option",
- cpus_conf, cpus_onln, cpus_onln);
+ log_info(LD_GENERAL, "I think we have %ld CPUS, but only %ld of them "
+ "are available. Telling Tor to only use %ld. You can over"
+ "ride this with the NumCPUs option",
+ cpus_conf, cpus_onln, cpus_onln);
}
cpus = cpus_onln;
}