mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
Merge tag 'for-5.17/io_uring-2022-01-11' of git://git.kernel.dk/linux-block
Pull io_uring updates from Jens Axboe: - Support for prioritized work completions (Hao) - Simplification of reissue (Pavel) - Add support for CQE skip (Pavel) - Memory leak fix going to 5.15-stable (Pavel) - Re-write of internal poll. This both cleans up that code, and gets us ready to fix the POLLFREE issue (Pavel) - Various cleanups (GuoYong, Pavel, Hao) * tag 'for-5.17/io_uring-2022-01-11' of git://git.kernel.dk/linux-block: (31 commits) io_uring: fix not released cached task refs io_uring: remove redundant tab space io_uring: remove unused function parameter io_uring: use completion batching for poll rem/upd io_uring: single shot poll removal optimisation io_uring: poll rework io_uring: kill poll linking optimisation io_uring: move common poll bits io_uring: refactor poll update io_uring: remove double poll on poll update io_uring: code clean for some ctx usage io_uring: batch completion in prior_task_list io_uring: split io_req_complete_post() and add a helper io_uring: add helper for task work execution code io_uring: add a priority tw list for irq completion work io-wq: add helper to merge two wq_lists io_uring: reuse io_req_task_complete for timeouts io_uring: tweak iopoll CQE_SKIP event counting io_uring: simplify selected buf handling io_uring: move up io_put_kbuf() and io_put_rw_kbuf() ...
This commit is contained in:
22
fs/io-wq.h
22
fs/io-wq.h
@@ -52,6 +52,28 @@ static inline void wq_list_add_after(struct io_wq_work_node *node,
|
|||||||
list->last = node;
|
list->last = node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wq_list_merge - merge the second list to the first one.
|
||||||
|
* @list0: the first list
|
||||||
|
* @list1: the second list
|
||||||
|
* Return the first node after mergence.
|
||||||
|
*/
|
||||||
|
static inline struct io_wq_work_node *wq_list_merge(struct io_wq_work_list *list0,
|
||||||
|
struct io_wq_work_list *list1)
|
||||||
|
{
|
||||||
|
struct io_wq_work_node *ret;
|
||||||
|
|
||||||
|
if (!list0->first) {
|
||||||
|
ret = list1->first;
|
||||||
|
} else {
|
||||||
|
ret = list0->first;
|
||||||
|
list0->last->next = list1->first;
|
||||||
|
}
|
||||||
|
INIT_WQ_LIST(list0);
|
||||||
|
INIT_WQ_LIST(list1);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static inline void wq_list_add_tail(struct io_wq_work_node *node,
|
static inline void wq_list_add_tail(struct io_wq_work_node *node,
|
||||||
struct io_wq_work_list *list)
|
struct io_wq_work_list *list)
|
||||||
{
|
{
|
||||||
|
|||||||
1192
fs/io_uring.c
1192
fs/io_uring.c
File diff suppressed because it is too large
Load Diff
@@ -70,6 +70,7 @@ enum {
|
|||||||
IOSQE_IO_HARDLINK_BIT,
|
IOSQE_IO_HARDLINK_BIT,
|
||||||
IOSQE_ASYNC_BIT,
|
IOSQE_ASYNC_BIT,
|
||||||
IOSQE_BUFFER_SELECT_BIT,
|
IOSQE_BUFFER_SELECT_BIT,
|
||||||
|
IOSQE_CQE_SKIP_SUCCESS_BIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -87,6 +88,8 @@ enum {
|
|||||||
#define IOSQE_ASYNC (1U << IOSQE_ASYNC_BIT)
|
#define IOSQE_ASYNC (1U << IOSQE_ASYNC_BIT)
|
||||||
/* select buffer from sqe->buf_group */
|
/* select buffer from sqe->buf_group */
|
||||||
#define IOSQE_BUFFER_SELECT (1U << IOSQE_BUFFER_SELECT_BIT)
|
#define IOSQE_BUFFER_SELECT (1U << IOSQE_BUFFER_SELECT_BIT)
|
||||||
|
/* don't post CQE if request succeeded */
|
||||||
|
#define IOSQE_CQE_SKIP_SUCCESS (1U << IOSQE_CQE_SKIP_SUCCESS_BIT)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* io_uring_setup() flags
|
* io_uring_setup() flags
|
||||||
@@ -289,6 +292,7 @@ struct io_uring_params {
|
|||||||
#define IORING_FEAT_EXT_ARG (1U << 8)
|
#define IORING_FEAT_EXT_ARG (1U << 8)
|
||||||
#define IORING_FEAT_NATIVE_WORKERS (1U << 9)
|
#define IORING_FEAT_NATIVE_WORKERS (1U << 9)
|
||||||
#define IORING_FEAT_RSRC_TAGS (1U << 10)
|
#define IORING_FEAT_RSRC_TAGS (1U << 10)
|
||||||
|
#define IORING_FEAT_CQE_SKIP (1U << 11)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* io_uring_register(2) opcodes and arguments
|
* io_uring_register(2) opcodes and arguments
|
||||||
|
|||||||
Reference in New Issue
Block a user