t/io_uring: remember to set p->sq_thread_cpu
authorJens Axboe <axboe@kernel.dk>
Fri, 11 Jan 2019 18:38:29 +0000 (11:38 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 11 Jan 2019 18:38:29 +0000 (11:38 -0700)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/io_uring.c

index 0c8058ba089ed997274005edb871e00e4324be90..595e6f2059d71721bf1b0ed83c18b9560e52a264 100644 (file)
@@ -386,8 +386,10 @@ static int setup_ring(struct submitter *s)
                p.flags |= IORING_SETUP_IOPOLL;
        if (sq_thread_poll) {
                p.flags |= IORING_SETUP_SQPOLL;
-               if (sq_thread_cpu != -1)
+               if (sq_thread_cpu != -1) {
                        p.flags |= IORING_SETUP_SQ_AFF;
+                       p.sq_thread_cpu = sq_thread_cpu;
+               }
        }
 
        fd = io_uring_setup(DEPTH, &p);