summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2023-01-19 10:49:47 +0100
committerMaria Matejka <mq@ucw.cz>2023-01-19 11:13:50 +0100
commit84c298465f6360a8694d4837f3420961ea321fa5 (patch)
tree273455bf0e6f1b7a1be8956692feacbf6b3484a3 /conf
parent4d8d81f144e72fe2e182d7569087f2a8c8c5b938 (diff)
Decoupling loops from threads to allow fixed thread count
On large configurations, too many threads would spawn with one thread per loop. Therefore, threads may now run multiple loops at once. The thread count is configurable and may be changed during run. All threads are spawned on startup. This change helps with memory bloating. BIRD filters need large temporary memory blocks to store their stack and also memory management keeps its hot page storage per-thread. Known bugs: * Thread autobalancing is not yet implemented. * Low latency loops are executed together with standard loops.
Diffstat (limited to 'conf')
-rw-r--r--conf/conf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/conf/conf.h b/conf/conf.h
index ce4a3c5a..9f011ef7 100644
--- a/conf/conf.h
+++ b/conf/conf.h
@@ -54,6 +54,7 @@ struct config {
char *err_file_name; /* File name containing error */
char *file_name; /* Name of main configuration file */
int file_fd; /* File descriptor of main configuration file */
+ int thread_count; /* How many worker threads to prefork */
struct sym_scope *root_scope; /* Scope for root symbols */
int obstacle_count; /* Number of items blocking freeing of this config */