Author: Joris Vink <firstname.lastname@example.org>
Date: Wed, 8 Mar 2023 20:11:49 +0100
Move CPU pinning to kore_worker_started().
When trying to pin a worker to a certain CPU, Kore will log
if it fails but still continue.
The problem is that it tried to do it a bit early and the logging
facilities were not yet setup, causing it to be unable to continue
if kore_log() was called too early.
By moving it to kore_worker_started() we are certain all facilities
are up and running correctly.
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/worker.c b/src/worker.c
@@ -450,9 +450,6 @@ kore_worker_entry(struct kore_worker *kw)
- if (worker_set_affinity == 1)
kore_pid = kw->pid;
@@ -752,6 +749,9 @@ kore_worker_started(void)
const char *chroot;
+ if (worker_set_affinity == 1)
chroot = "root";