| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
io_uring: import 5.15-stable io_uring stable inclusion from stable-v5.10.162 commit 788d0824269bef539fe31a785b1517882eafed93 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I6BTWC CVE: CVE-2023-0240 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.167&id=788d0824269bef539fe31a785b1517882eafed93 -------------------------------- No upstream commit exists. This imports the io_uring codebase from 5.15.85, wholesale. Changes from that code base: - Drop IOCB_ALLOC_CACHE, we don't have that in 5.10. - Drop MKDIRAT/SYMLINKAT/LINKAT. Would require further VFS backports, and we don't support these in 5.10 to begin with. - sock_from_file() old style calling convention. - Use compat_get_bitmap() only for CONFIG_COMPAT=y Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Wang Weiyang <wangweiyang2@huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> | 3 年前 | |
io_uring/io-wq: do not use bogus hash value mainline inclusion from mainline-v6.15-rc1 commit 486ba4d84d62e92716cd395c4b1612b8ce70a257 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IC6ES1 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=486ba4d84d62e92716cd395c4b1612b8ce70a257 -------------------------------- Previously, the hash variable was initialized with -1 and only updated by io_get_next_work() if the current work was hashed. Commit 60cf46ae6054 ("io-wq: hash dependent work") changed this to always call io_get_work_hash() even if the work was not hashed. This caused the hash != -1U check to always be true, adding some overhead for the hash->wait code. This patch fixes the regression by checking the IO_WQ_WORK_HASHED flag. Perf diff for a flood of IORING_OP_NOP with IOSQE_ASYNC: 38.55% -1.57% [kernel.kallsyms] [k] queued_spin_lock_slowpath 6.86% -0.72% [kernel.kallsyms] [k] io_worker_handle_work 0.10% +0.67% [kernel.kallsyms] [k] put_prev_entity 1.96% +0.59% [kernel.kallsyms] [k] io_nop_prep 3.31% -0.51% [kernel.kallsyms] [k] try_to_wake_up 7.18% -0.47% [kernel.kallsyms] [k] io_wq_free_work Fixes: 60cf46ae6054 ("io-wq: hash dependent work") Cc: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Max Kellermann <max.kellermann@ionos.com> Link: https://lore.kernel.org/r/20250128133927.3989681-6-max.kellermann@ionos.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Conflicts: io_uring/io-wq.c [Commit 6ee78354eaa6 ("io_uring/io-wq: cache work->flags in variable") replace io_get_work_hash with __io_get_work_hash.] Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com> | 1 年前 | |
io_uring: break out of iowq iopoll on teardown stable inclusion from stable-v5.10.195 commit 9faa6d0677ec0a5b459b94c1b1f45117974e3b10 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I95JOC Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9faa6d0677ec0a5b459b94c1b1f45117974e3b10 -------------------------------- [ upstream commit 45500dc4e01c167ee063f3dcc22f51ced5b2b1e9 ] io-wq will retry iopoll even when it failed with -EAGAIN. If that races with task exit, which sets TIF_NOTIFY_SIGNAL for all its workers, such workers might potentially infinitely spin retrying iopoll again and again and each time failing on some allocation / waiting / etc. Don't keep spinning if io-wq is dying. Fixes: 561fb04a6a225 ("io_uring: replace workqueue usage with io-wq") Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: sanglipeng <sanglipeng1@jd.com> | 2 年前 | |
io_uring: Support forcing sq thread to be idle and woken up by hrtimer euleros inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/ICKSA6 --------------------------------------------- This patch adds one option IORING_SETUP_SQ_THREAD_IDLE for io_uring user program to reduce cpu usage of sq thread. When enabled, sq polling thread will try to be idle. a hrtimer will be created to wake up the sq thread periodically, the period can be set by io_uring_params.sq_thread_wakeup_period(unit: us, default 10ms). Signed-off-by: ChenZhen <chenzhen126@huawei.com> | 11 个月前 |