Skip to content

Commit c5ac744

Browse files
committed
Merge tag 'io_uring-6.11-20240824' of git://git.kernel.dk/linux
Pull io_uring fixes from Jens Axboe: - Fix a comment in the uapi header using the wrong member name (Caleb) - Fix KCSAN warning for a debug check in sqpoll (me) - Two more NAPI tweaks (Olivier) * tag 'io_uring-6.11-20240824' of git://git.kernel.dk/linux: io_uring: fix user_data field name in comment io_uring/sqpoll: annotate debug task == current with data_race() io_uring/napi: remove duplicate io_napi_entry timeout assignation io_uring/napi: check napi_enabled in io_napi_add() before proceeding
2 parents 2731835 + 1fc2ac4 commit c5ac744

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

include/uapi/linux/io_uring.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ enum io_uring_msg_ring_flags {
421421
* IO completion data structure (Completion Queue Entry)
422422
*/
423423
struct io_uring_cqe {
424-
__u64 user_data; /* sqe->data submission passed back */
424+
__u64 user_data; /* sqe->user_data value passed back */
425425
__s32 res; /* result code for this event */
426426
__u32 flags;
427427

io_uring/napi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ static struct io_napi_entry *io_napi_hash_find(struct hlist_head *hash_list,
2626
hlist_for_each_entry_rcu(e, hash_list, node) {
2727
if (e->napi_id != napi_id)
2828
continue;
29-
e->timeout = jiffies + NAPI_TIMEOUT;
3029
return e;
3130
}
3231

@@ -302,7 +301,7 @@ void __io_napi_busy_loop(struct io_ring_ctx *ctx, struct io_wait_queue *iowq)
302301
{
303302
iowq->napi_prefer_busy_poll = READ_ONCE(ctx->napi_prefer_busy_poll);
304303

305-
if (!(ctx->flags & IORING_SETUP_SQPOLL) && ctx->napi_enabled)
304+
if (!(ctx->flags & IORING_SETUP_SQPOLL))
306305
io_napi_blocking_busy_loop(ctx, iowq);
307306
}
308307

io_uring/napi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static inline void io_napi_add(struct io_kiocb *req)
5555
struct io_ring_ctx *ctx = req->ctx;
5656
struct socket *sock;
5757

58-
if (!READ_ONCE(ctx->napi_busy_poll_dt))
58+
if (!READ_ONCE(ctx->napi_enabled))
5959
return;
6060

6161
sock = sock_from_file(req->file);

io_uring/sqpoll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void io_sq_thread_unpark(struct io_sq_data *sqd)
4444
void io_sq_thread_park(struct io_sq_data *sqd)
4545
__acquires(&sqd->lock)
4646
{
47-
WARN_ON_ONCE(sqd->thread == current);
47+
WARN_ON_ONCE(data_race(sqd->thread) == current);
4848

4949
atomic_inc(&sqd->park_pending);
5050
set_bit(IO_SQ_THREAD_SHOULD_PARK, &sqd->state);

0 commit comments

Comments
 (0)