On 1/25/20 12:45 AM, Stefan Metzmacher wrote: > Am 24.01.20 um 22:31 schrieb Jens Axboe: >> An id field is added to io_uring_params, which always returns the ID of >> the io-wq backend that is associated with an io_uring context. If an 'id' >> is provided and IORING_SETUP_SHARED is set in the creation flags, then >> we attempt to attach to an existing io-wq instead of setting up a new one. > > Use the new name here too. Already fixed that up yesterday. >> ret = io_uring_create(entries, &p); >> diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h >> index 57d05cc5e271..f66e53c74a3d 100644 >> --- a/include/uapi/linux/io_uring.h >> +++ b/include/uapi/linux/io_uring.h >> @@ -75,6 +75,7 @@ enum { >> #define IORING_SETUP_SQ_AFF (1U << 2) /* sq_thread_cpu is valid */ >> #define IORING_SETUP_CQSIZE (1U << 3) /* app defines CQ size */ >> #define IORING_SETUP_CLAMP (1U << 4) /* clamp SQ/CQ ring sizes */ >> +#define IORING_SETUP_ATTACH_WQ (1U << 5) /* attach to existing wq */ >> >> enum { >> IORING_OP_NOP, >> @@ -183,7 +184,8 @@ struct io_uring_params { >> __u32 sq_thread_cpu; >> __u32 sq_thread_idle; >> __u32 features; >> - __u32 resv[4]; >> + __u32 id; > > I think this should be wq_id; Yeah, probably clearer, I'll make that change, thanks. -- Jens Axboe