Skip to content

Commit 96f7e44

Browse files
committed
Merge tag 'for-6.2/io_uring-next-2022-12-08' of git://git.kernel.dk/linux
Pull io_uring updates part two from Jens Axboe: - Misc fixes (me, Lin) - Series from Pavel extending the single task exclusive ring mode, yielding nice improvements for the common case of having a single ring per thread (Pavel) - Cleanup for MSG_RING, removing our IOPOLL hack (Pavel) - Further poll cleanups and fixes (Pavel) - Misc cleanups and fixes (Pavel) * tag 'for-6.2/io_uring-next-2022-12-08' of git://git.kernel.dk/linux: (22 commits) io_uring/msg_ring: flag target ring as having task_work, if needed io_uring: skip spinlocking for ->task_complete io_uring: do msg_ring in target task via tw io_uring: extract a io_msg_install_complete helper io_uring: get rid of double locking io_uring: never run tw and fallback in parallel io_uring: use tw for putting rsrc io_uring: force multishot CQEs into task context io_uring: complete all requests in task context io_uring: don't check overflow flush failures io_uring: skip overflow CQE posting for dying ring io_uring: improve io_double_lock_ctx fail handling io_uring: dont remove file from msg_ring reqs io_uring: reshuffle issue_flags io_uring: don't reinstall quiesce node for each tw io_uring: improve rsrc quiesce refs checks io_uring: don't raw spin unlock to match cq_lock io_uring: combine poll tw handlers io_uring: improve poll warning handling io_uring: remove ctx variable in io_poll_check_events ...
2 parents 54e60e5 + 761c61c commit 96f7e44

File tree

12 files changed

+369
-196
lines changed

12 files changed

+369
-196
lines changed

include/linux/io_uring.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@
99
enum io_uring_cmd_flags {
1010
IO_URING_F_COMPLETE_DEFER = 1,
1111
IO_URING_F_UNLOCKED = 2,
12+
/* the request is executed from poll, it should not be freed */
13+
IO_URING_F_MULTISHOT = 4,
14+
/* executed by io-wq */
15+
IO_URING_F_IOWQ = 8,
1216
/* int's last bit, sign checks are usually faster than a bit test */
1317
IO_URING_F_NONBLOCK = INT_MIN,
1418

1519
/* ctx state flags, for URING_CMD */
16-
IO_URING_F_SQE128 = 4,
17-
IO_URING_F_CQE32 = 8,
18-
IO_URING_F_IOPOLL = 16,
19-
20-
/* the request is executed from poll, it should not be freed */
21-
IO_URING_F_MULTISHOT = 32,
20+
IO_URING_F_SQE128 = (1 << 8),
21+
IO_URING_F_CQE32 = (1 << 9),
22+
IO_URING_F_IOPOLL = (1 << 10),
2223
};
2324

2425
struct io_uring_cmd {

include/linux/io_uring_types.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ struct io_ring_ctx {
208208
unsigned int drain_disabled: 1;
209209
unsigned int has_evfd: 1;
210210
unsigned int syscall_iopoll: 1;
211+
/* all CQEs should be posted only by the submitter task */
212+
unsigned int task_complete: 1;
211213
} ____cacheline_aligned_in_smp;
212214

213215
/* submission data */
@@ -326,6 +328,7 @@ struct io_ring_ctx {
326328
struct io_rsrc_data *buf_data;
327329

328330
struct delayed_work rsrc_put_work;
331+
struct callback_head rsrc_put_tw;
329332
struct llist_head rsrc_put_llist;
330333
struct list_head rsrc_ref_list;
331334
spinlock_t rsrc_ref_lock;

0 commit comments

Comments
 (0)