History

Merge tag 'for-5.19/io_uring-2022-05-22' of git://git.kernel.dk/linux-block

Pull io_uring updates from Jens Axboe: "Here are the main io_uring changes for 5.19. This contains: - Fixes for sparse type warnings (Christoph, Vasily) - Support for multi-shot accept (Hao) - Support for io_uring managed fixed files, rather than always needing the applicationt o manage the indices (me) - Fix for a spurious poll wakeup (Dylan) - CQE overflow fixes (Dylan) - Support more types of cancelations (me) - Support for co-operative task_work signaling, rather than always forcing an IPI (me) - Support for doing poll first when appropriate, rather than always attempting a transfer first (me) - Provided buffer cleanups and support for mapped buffers (me) - Improve how io_uring handles inflight SCM files (Pavel) - Speedups for registered files (Pavel, me) - Organize the completion data in a struct in io_kiocb rather than keep it in separate spots (Pavel) - task_work improvements (Pavel) - Cleanup and optimize the submission path, in general and for handling links (Pavel) - Speedups for registered resource handling (Pavel) - Support sparse buffers and file maps (Pavel, me) - Various fixes and cleanups (Almog, Pavel, me)" * tag 'for-5.19/io_uring-2022-05-22' of git://git.kernel.dk/linux-block: (111 commits) io_uring: fix incorrect __kernel_rwf_t cast io_uring: disallow mixed provided buffer group registrations io_uring: initialize io_buffer_list head when shared ring is unregistered io_uring: add fully sparse buffer registration io_uring: use rcu_dereference in io_close io_uring: consistently use the EPOLL* defines io_uring: make apoll_events a __poll_t io_uring: drop a spurious inline on a forward declaration io_uring: don't use ERR_PTR for user pointers io_uring: use a rwf_t for io_rw.flags io_uring: add support for ring mapped supplied buffers io_uring: add io_pin_pages() helper io_uring: add buffer selection support to IORING_OP_NOP io_uring: fix locking state for empty buffer group io_uring: implement multishot mode for accept io_uring: let fast poll support multishot io_uring: add REQ_F_APOLL_MULTISHOT for requests io_uring: add IORING_ACCEPT_MULTISHOT for accept io_uring: only wake when the correct events are set io_uring: avoid io-wq -EAGAIN looping for !IOPOLL ...

Linus Torvalds committed 4 years ago

Commit 3a166bd2 parents 1e57930 0e7579c8 files · +1813 −1031Browse files

Showing the changes to kernel (1 of 8 files). Show all

Unified · Split

kernel/task_work.c+19−6
@@ -12,12 +12,22 @@ static struct callback_head work_exited; /* all we need is ->next == NULL */ · 11 unmodified lines
12 * @notify: how to notify the targeted task12 * @notify: how to notify the targeted task
13 *13 *
14 * Queue @work for task_work_run() below and notify the @task if @notify14 * Queue @work for task_work_run() below and notify the @task if @notify
15 * is @TWA_RESUME or @TWA_SIGNAL. @TWA_SIGNAL works like signals, in that the15 * is @TWA_RESUME, @TWA_SIGNAL, or @TWA_SIGNAL_NO_IPI.
16 * it will interrupt the targeted task and run the task_work. @TWA_RESUME16 *
17 * work is run only when the task exits the kernel and returns to user mode,17 * @TWA_SIGNAL works like signals, in that the it will interrupt the targeted
18 * or before entering guest mode. Fails if the @task is exiting/exited and thus18 * task and run the task_work, regardless of whether the task is currently
19 * it can't process this @work. Otherwise @work->func() will be called when the19 * running in the kernel or userspace.
20 * @task goes through one of the aforementioned transitions, or exits.20 * @TWA_SIGNAL_NO_IPI works like @TWA_SIGNAL, except it doesn't send a
21 * reschedule IPI to force the targeted task to reschedule and run task_work.
22 * This can be advantageous if there's no strict requirement that the
23 * task_work be run as soon as possible, just whenever the task enters the
24 * kernel anyway.
25 * @TWA_RESUME work is run only when the task exits the kernel and returns to
26 * user mode, or before entering guest mode.
27 *
28 * Fails if the @task is exiting/exited and thus it can't process this @work.
29 * Otherwise @work->func() will be called when the @task goes through one of
30 * the aforementioned transitions, or exits.
21 *31 *
22 * If the targeted task is exiting, then an error is returned and the work item32 * If the targeted task is exiting, then an error is returned and the work item
23 * is not queued. It's up to the caller to arrange for an alternative mechanism33 * is not queued. It's up to the caller to arrange for an alternative mechanism
@@ -53,6 +63,9 @@ int task_work_add(struct task_struct *task, struct callback_head *work, · 29 unmodified lines
53 case TWA_SIGNAL:63 case TWA_SIGNAL:
54 set_notify_signal(task);64 set_notify_signal(task);
55 break;65 break;
66 case TWA_SIGNAL_NO_IPI:
67 __set_notify_signal(task);
68 break;
56 default:69 default:
57 WARN_ON_ONCE(1);70 WARN_ON_ONCE(1);
58 break;71 break;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t