]> git.ipfire.org Git - thirdparty/tor.git/commit
relay: Make the max pending tasks per CPU a consensus parameter
authorDavid Goulet <dgoulet@torproject.org>
Wed, 9 Nov 2022 17:49:23 +0000 (12:49 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Wed, 9 Nov 2022 18:13:21 +0000 (13:13 -0500)
commite3f6908984c6f2e6361a1a15f37d6bb0647efda9
treec7afb64fa267fb53625ff9f56e32dac178368a55
parent9c8c7804d535b4248e7e029c969d9a77a54947f6
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>
changes/ticket40704
src/core/mainloop/cpuworker.c
src/core/mainloop/cpuworker.h
src/feature/nodelist/networkstatus.c
src/lib/thread/numcpus.c