From 2354d8103b080b37eb260b9746f8b82309b75979 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 19 May 2016 11:41:28 -0600 Subject: [PATCH] backend: move iolog compression init before CPU affinity settings Previously we did this after we had set CPU affinity for the IO worker. But if we do that, then we limit the log compression to the exact CPUs that we don't want it to run on. So let's do this earlier, which means the compression threads can run anyway. We'll trust the OS scheduler to keep them out of our way. Signed-off-by: Jens Axboe --- backend.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/backend.c b/backend.c index 243ddd39..f8300405 100644 --- a/backend.c +++ b/backend.c @@ -1471,6 +1471,14 @@ static void *thread_main(void *data) goto err; } + /* + * Do this early, we don't want the compress threads to be limited + * to the same CPUs as the IO workers. So do this before we set + * any potential CPU affinity + */ + if (iolog_compress_init(td, sk_out)) + goto err; + /* * If we have a gettimeofday() thread, make sure we exclude that * thread from this job @@ -1605,9 +1613,6 @@ static void *thread_main(void *data) goto err; } - if (iolog_compress_init(td, sk_out)) - goto err; - fio_verify_init(td); if (rate_submit_init(td, sk_out)) -- 2.25.1