aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist
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/feature/nodelist
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/feature/nodelist')
-rw-r--r--src/feature/nodelist/networkstatus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c
index aaddf2331d..fa1e38dac0 100644
--- a/src/feature/nodelist/networkstatus.c
+++ b/src/feature/nodelist/networkstatus.c
@@ -40,6 +40,7 @@
#include "core/or/or.h"
#include "app/config/config.h"
#include "core/mainloop/connection.h"
+#include "core/mainloop/cpuworker.h"
#include "core/mainloop/mainloop.h"
#include "core/mainloop/netstatus.h"
#include "core/or/channel.h"
@@ -1668,6 +1669,7 @@ notify_before_networkstatus_changes(const networkstatus_t *old_c,
relay_consensus_has_changed(new_c);
hs_dos_consensus_has_changed(new_c);
rep_hist_consensus_has_changed(new_c);
+ cpuworker_consensus_has_changed(new_c);
}
/* Called after a new consensus has been put in the global state. It is safe