From: Jens Axboe Date: Thu, 19 May 2016 17:41:28 +0000 (-0600) Subject: backend: move iolog compression init before CPU affinity settings X-Git-Tag: fio-2.10~12 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=2354d8103b080b37eb260b9746f8b82309b75979;ds=sidebyside 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 --- 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))