2026-02-03 16:46:24 -07:00
|
|
|
|
2022-07-12 21:52:38 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:41 +01:00
|
|
|
|
2022-07-12 21:52:38 +01:00
|
|
|
|
2024-04-19 12:08:42 +01:00
|
|
|
|
|
|
|
|
|
2025-10-31 14:34:29 -06:00
|
|
|
|
2022-07-12 21:52:38 +01:00
|
|
|
|
2025-10-31 14:34:29 -06:00
|
|
|
|
2022-07-27 10:30:41 +01:00
|
|
|
|
2025-08-14 15:40:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:38 +01:00
|
|
|
|
2024-04-19 12:08:42 +01:00
|
|
|
|
|
|
|
|
|
2022-11-04 10:59:46 +00:00
|
|
|
|
2025-08-14 15:40:57 +01:00
|
|
|
|
|
|
|
|
|
2024-04-19 12:08:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-10-31 14:34:29 -06:00
|
|
|
|
2024-04-19 12:08:42 +01:00
|
|
|
|
2022-11-04 10:59:45 +00:00
|
|
|
|
|
|
|
|
|
2024-04-19 12:08:41 +01:00
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:38 +01:00
|
|
|
|
2022-07-27 10:30:41 +01:00
|
|
|
|
|
|
|
|
|
2024-04-30 16:42:31 +01:00
|
|
|
|
2022-07-12 21:52:38 +01:00
|
|
|
|
2022-10-27 20:34:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-08 00:54:55 +01:00
|
|
|
|
2024-04-15 13:50:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-19 12:08:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-30 16:42:31 +01:00
|
|
|
|
|
|
|
|
|
2024-04-15 13:50:11 +01:00
|
|
|
|
2024-04-30 16:42:31 +01:00
|
|
|
|
2022-07-12 21:52:39 +01:00
|
|
|
|
|
|
|
|
|
2024-04-19 12:08:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-09-19 17:03:52 +08:00
|
|
|
|
2024-04-19 12:08:42 +01:00
|
|
|
|
2025-11-04 21:01:09 -08:00
|
|
|
|
2024-04-19 12:08:42 +01:00
|
|
|
|
io_uring: move struct io_kiocb from task_struct to io_uring_task
Rather than store the task_struct itself in struct io_kiocb, store
the io_uring specific task_struct. The life times are the same in terms
of io_uring, and this avoids doing some dereferences through the
task_struct. For the hot path of putting local task references, we can
deref req->tctx instead, which we'll need anyway in that function
regardless of whether it's local or remote references.
This is mostly straight forward, except the original task PF_EXITING
check needs a bit of tweaking. task_work is _always_ run from the
originating task, except in the fallback case, where it's run from a
kernel thread. Replace the potentially racy (in case of fallback work)
checks for req->task->flags with current->flags. It's either the still
the original task, in which case PF_EXITING will be sane, or it has
PF_KTHREAD set, in which case it's fallback work. Both cases should
prevent moving forward with the given request.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-11-03 10:23:38 -07:00
|
|
|
|
2024-04-19 12:08:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-19 12:08:39 +01:00
|
|
|
|
|
|
|
|
|
2024-04-19 12:08:42 +01:00
|
|
|
|
2024-04-19 12:08:39 +01:00
|
|
|
|
|
|
|
|
|
2022-09-01 11:54:04 +01:00
|
|
|
|
2022-07-12 21:52:38 +01:00
|
|
|
|
|
|
|
|
|
2022-07-27 10:30:41 +01:00
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:38 +01:00
|
|
|
|
2023-01-23 14:37:16 +00:00
|
|
|
|
2022-07-27 10:30:41 +01:00
|
|
|
|
2025-05-06 13:31:07 +01:00
|
|
|
|
2022-07-27 10:30:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring: move struct io_kiocb from task_struct to io_uring_task
Rather than store the task_struct itself in struct io_kiocb, store
the io_uring specific task_struct. The life times are the same in terms
of io_uring, and this avoids doing some dereferences through the
task_struct. For the hot path of putting local task references, we can
deref req->tctx instead, which we'll need anyway in that function
regardless of whether it's local or remote references.
This is mostly straight forward, except the original task PF_EXITING
check needs a bit of tweaking. task_work is _always_ run from the
originating task, except in the fallback case, where it's run from a
kernel thread. Replace the potentially racy (in case of fallback work)
checks for req->task->flags with current->flags. It's either the still
the original task, in which case PF_EXITING will be sane, or it has
PF_KTHREAD set, in which case it's fallback work. Both cases should
prevent moving forward with the given request.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-11-03 10:23:38 -07:00
|
|
|
|
2022-07-27 10:30:41 +01:00
|
|
|
|
2024-11-03 08:46:07 -07:00
|
|
|
|
|
|
|
|
|
2022-07-12 21:52:38 +01:00
|
|
|
|
2022-07-27 10:30:41 +01:00
|
|
|
|
2024-04-08 00:54:55 +01:00
|
|
|
|
|
|
|
|
|
2024-04-19 12:08:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-15 14:20:08 +01:00
|
|
|
|
2024-04-19 12:08:39 +01:00
|
|
|
|
2022-07-27 10:30:41 +01:00
|
|
|
|
2022-07-12 21:52:38 +01:00
|
|
|
|
|
|
|
|
|