From 3b03c4b2bcbcf5a913a3127d2b45283540c505c3 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 2 Apr 2018 08:19:54 +0200 Subject: ipcpd: Enable locking threads to a CPU core This adds a function that locks a thread to a random core. This greatly improves performance on multi-cpu systems. There is no portable way to do this, this only implements it for GNU/Linux. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/local/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ipcpd/local') diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c index 787fc289..358f6388 100644 --- a/src/ipcpd/local/main.c +++ b/src/ipcpd/local/main.c @@ -97,6 +97,8 @@ static void * ipcp_local_sdu_loop(void * o) { (void) o; + ipcp_lock_to_core(); + while (true) { int fd; ssize_t idx; -- cgit v1.2.3