X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Fwindowsaio.c;h=f5cb04838a31f70dc6cf801239e33df16800f54c;hb=785e49c659023df1735bff195ad4ba133ebd23a7;hp=0e164b604b1b9b00c6a96601dbe1c57635a962e5;hpb=565e784df05c2529479eed8a38701a33b01894bd;p=fio.git diff --git a/engines/windowsaio.c b/engines/windowsaio.c index 0e164b60..f5cb0483 100644 --- a/engines/windowsaio.c +++ b/engines/windowsaio.c @@ -113,10 +113,15 @@ static int fio_windowsaio_init(struct thread_data *td) if (!rc) { + DWORD threadid; + ctx->iocp = hFile; ctx->wd = wd; - wd->iothread = CreateThread(NULL, 0, IoCompletionRoutine, ctx, 0, NULL); - if (wd->iothread == NULL) + wd->iothread = CreateThread(NULL, 0, IoCompletionRoutine, ctx, 0, &threadid); + + if (wd->iothread != NULL) + fio_setaffinity(threadid, td->o.cpumask); + else log_err("windowsaio: failed to create io completion thread\n"); }