Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring: handle traditional task_work in FIFO order

For local task_work, which is used if IORING_SETUP_DEFER_TASKRUN is set,
we reverse the order of the lockless list before processing the work.
This is done to process items in the order in which they were queued, as
the llist always adds to the head.

Do the same for traditional task_work, so we have the same behavior for
both types.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

+1 -1
+1 -1
io_uring/io_uring.c
··· 1266 1266 1267 1267 node = llist_del_all(&tctx->task_list); 1268 1268 if (node) 1269 - count = handle_tw_list(node, &ctx, &ts); 1269 + count = handle_tw_list(llist_reverse_order(node), &ctx, &ts); 1270 1270 1271 1271 ctx_flush_and_put(ctx, &ts); 1272 1272