From: Willy Tarreau Date: Mon, 11 Aug 2025 15:29:04 +0000 (+0200) Subject: OPTIM: tasks: align task and tasklet pools to 64 X-Git-Tag: v3.3-dev7~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c471de7964ff44f1b4abf8d906eff744881bf08d;p=thirdparty%2Fhaproxy.git OPTIM: tasks: align task and tasklet pools to 64 These structs are intensively used and really must not experience false sharing, so let's declare them aligned to 64. We don't try to align the struct themselves, as we don't want the compiler to expand them either. --- diff --git a/src/task.c b/src/task.c index f60ee99bf..11b5e635e 100644 --- a/src/task.c +++ b/src/task.c @@ -27,8 +27,8 @@ extern struct task *process_stream(struct task *t, void *context, unsigned int state); extern void stream_update_timings(struct task *t, uint64_t lat, uint64_t cpu); -DECLARE_TYPED_POOL(pool_head_task, "task", struct task); -DECLARE_TYPED_POOL(pool_head_tasklet, "tasklet", struct tasklet); +DECLARE_TYPED_POOL(pool_head_task, "task", struct task, 0, 64); +DECLARE_TYPED_POOL(pool_head_tasklet, "tasklet", struct tasklet, 0, 64); /* This is the memory pool containing all the signal structs. These * struct are used to store each required signal between two tasks.