io_commit_cqring __io_cqring_fill_event take up too much cpu
Hi Jens,
I found a problem, and I think it is necessary to solve it. But the change may be relatively large, so I would like to ask you and everyone for your opinions. Or everyone has other ideas about this issue:
Problem description:
===================
I found that in the sq thread mode, the CPU used by io_commit_cqring and __io_cqring_fill_event accounts for a relatively large amount. The reason is because a large number of calls to smp_store_release and WRITE_ONCE. These two functions are relatively slow, and we need to call smp_store_release every time we submit a cqe. This large number of calls has caused this problem to become very prominent.
My test environment is in qemu, using io_uring to accept a large number of udp packets in sq thread mode, the speed is 800000pps. I submitted 100 sqes to recv udp packet at the beginning of the application, and every time I received a cqe, I submitted another sqe. The perf top result of sq thread is as follows:
17.97% [kernel] [k] copy_user_generic_unrolled
13.92% [kernel] [k] io_commit_cqring
11.04% [kernel] [k] __io_cqring_fill_event
10.33% [kernel] [k] udp_recvmsg
5.94% [kernel] [k] skb_release_data
4.31% [kernel] [k] udp_rmem_release
2.68% [kernel] [k] __check_object_size
2.24% [kernel] [k] __slab_free
2.22% [kernel] [k] _raw_spin_lock_bh
2.21% [kernel] [k] kmem_cache_free
2.13% [kernel] [k] free_pcppages_bulk
1.83% [kernel] [k] io_submit_sqes
1.38% [kernel] [k] page_frag_free
1.31% [kernel] [k] inet_recvmsg
It can be seen that io_commit_cqring and __io_cqring_fill_event account for 24.96%. This is too much. In general, the proportion of syscall may not be so high, so we must solve this problem.
Solution:
=================
I consider that when the nr of an io_submit_sqes is too large, we don't call io_cqring_add_event directly, we can put the completed req in the queue, and then call __io_cqring_fill_event for each req then call once io_commit_cqring at the end of the io_submit_sqes function. In this way my local simple test looks good.
Thanks for your feedback,
Xuan Zhuo
Jens Axboe
maintainerQuoted 44 lines · Xuan Zhuo
Hi Jens,
I found a problem, and I think it is necessary to solve it. But the change may be relatively large, so I would like to ask you and everyone for your opinions. Or everyone has other ideas about this issue:Problem description:
===================
I found that in the sq thread mode, the CPU used byio_commit_cqringand__io_cqring_fill_eventaccounts for a relatively large amount. The reason is because a large number of calls tosmp_store_releaseandWRITE_ONCE. These two functions are relatively slow, and we need to callsmp_store_releaseevery time we submit a cqe. This large number of calls has caused this problem to become very prominent.My test environment is in qemu, using
io_uringto accept a large number of udp packets in sq thread mode, the speed is 800000pps. I submitted 100 sqes to recv udp packet at the beginning of the application, and every time I received a cqe, I submitted another sqe. The perf top result of sq thread is as follows:17.97% [kernel] [k]
copy_user_generic_unrolled
13.92% [kernel] [k]io_commit_cqring
11.04% [kernel] [k]__io_cqring_fill_event
10.33% [kernel] [k]udp_recvmsg
5.94% [kernel] [k]skb_release_data
4.31% [kernel] [k]udp_rmem_release
2.68% [kernel] [k]__check_object_size
2.24% [kernel] [k]__slab_free
2.22% [kernel] [k]_raw_spin_lock_bh
2.21% [kernel] [k]kmem_cache_free
2.13% [kernel] [k]free_pcppages_bulk
1.83% [kernel] [k]io_submit_sqes
1.38% [kernel] [k]page_frag_free
1.31% [kernel] [k]inet_recvmsgIt can be seen that
io_commit_cqringand__io_cqring_fill_eventaccount for 24.96%. This is too much. In general, the proportion of syscall may not be so high, so we must solve this problem.
Quoted 7 lines
Solution:
=================
I consider that when the nr of anio_submit_sqesis too large, we don't callio_cqring_add_eventdirectly, we can put the completed req in the queue, and then call__io_cqring_fill_eventfor each req then call onceio_commit_cqringat the end of theio_submit_sqesfunction. In this way my local simple test looks good.
I think the solution here is to defer the cq ring filling + commit to the caller instead of deep down the stack, I think that's a nice win in general. To do that, we need to be able to do it after io_submit_sqes() has been called. We can either do that inline, by passing down a list or struct that allows the caller to place the request there instead of filling the event, or out-of-band by having eg a percpu struct that allows the same thing. In both cases, the actual call site would do something ala:
if (comp_list && successful_completion) {
req->result = ret;
list_add_tail(&req->list, comp_list);
} else {
io_cqring_add_event(req, ret);
if (!successful_completion)
req_set_fail_links(req);
io_put_req(req);
}and then have the caller iterate the list and fill completions, if it's non-empty on return.
I don't think this is necessarily hard, but to do it nicely it will touch a bunch code and hence be quite a bit of churn. I do think the reward is worth it though, as this applies to the "normal" submission path as well, not just the SQPOLL variant.
Signature · 1 line
Jens Axboe
Jens Axboe
maintainerQuoted 71 lines · Jens Axboe
Quoted 44 lines · Xuan Zhuo
Hi Jens,
I found a problem, and I think it is necessary to solve it. But the change may be relatively large, so I would like to ask you and everyone for your opinions. Or everyone has other ideas about this issue:Problem description:
===================
I found that in the sq thread mode, the CPU used byio_commit_cqringand__io_cqring_fill_eventaccounts for a relatively large amount. The reason is because a large number of calls tosmp_store_releaseandWRITE_ONCE. These two functions are relatively slow, and we need to callsmp_store_releaseevery time we submit a cqe. This large number of calls has caused this problem to become very prominent.My test environment is in qemu, using
io_uringto accept a large number of udp packets in sq thread mode, the speed is 800000pps. I submitted 100 sqes to recv udp packet at the beginning of the application, and every time I received a cqe, I submitted another sqe. The perf top result of sq thread is as follows:17.97% [kernel] [k]
copy_user_generic_unrolled
13.92% [kernel] [k]io_commit_cqring
11.04% [kernel] [k]__io_cqring_fill_event
10.33% [kernel] [k]udp_recvmsg
5.94% [kernel] [k]skb_release_data
4.31% [kernel] [k]udp_rmem_release
2.68% [kernel] [k]__check_object_size
2.24% [kernel] [k]__slab_free
2.22% [kernel] [k]_raw_spin_lock_bh
2.21% [kernel] [k]kmem_cache_free
2.13% [kernel] [k]free_pcppages_bulk
1.83% [kernel] [k]io_submit_sqes
1.38% [kernel] [k]page_frag_free
1.31% [kernel] [k]inet_recvmsgIt can be seen that
io_commit_cqringand__io_cqring_fill_eventaccount for 24.96%. This is too much. In general, the proportion of syscall may not be so high, so we must solve this problem.Quoted 7 lines
Solution:
=================
I consider that when the nr of anio_submit_sqesis too large, we don't callio_cqring_add_eventdirectly, we can put the completed req in the queue, and then call__io_cqring_fill_eventfor each req then call onceio_commit_cqringat the end of theio_submit_sqesfunction. In this way my local simple test looks good.I think the solution here is to defer the cq ring filling + commit to the caller instead of deep down the stack, I think that's a nice win in general. To do that, we need to be able to do it after
io_submit_sqes()has been called. We can either do that inline, by passing down a list or struct that allows the caller to place the request there instead of filling the event, or out-of-band by having eg a percpu struct that allows the same thing. In both cases, the actual call site would do something ala:if (comp_list && successful_completion) { req->result = ret; list_add_tail(&req->list, comp_list); } else { io_cqring_add_event(req, ret); if (!successful_completion) req_set_fail_links(req); io_put_req(req); }
Quoted 7 lines
and then have the caller iterate the list and fill completions, if it's non-empty on return.
I don't think this is necessarily hard, but to do it nicely it will touch a bunch code and hence be quite a bit of churn. I do think the reward is worth it though, as this applies to the "normal" submission path as well, not just the SQPOLL variant.
Something like this series. I'd be interested to hear if it makes your specific test case any better.
Patches are against my for-5.9/io_uring branch.
Signature · 1 line
Jens Axboe
From 941e155f8386b76f5c9788d472a47bf2db4c8aa3 Mon Sep 17 00:00:00 2001
From: Jens Axboe <[email protected]>
Date: Mon, 22 Jun 2020 11:09:46 -0600
Subject: [PATCH 5/5] io_uring: enable READ/WRITE to use deferred completion
list
A bit more surgery required here, as completions are generally done through the kiocb->ki_complete() callback, even if they complete inline.
--- fs/io_uring.c | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-)
fs/io_uring.c +23 -15
@@ -1982,7 +1982,8 @@ static inline void req_set_fail_links(struct io_kiocb *req) req->flags |=REQ_F_FAIL_LINK ; } -static void io_complete_rw_common (struct kiocb *kiocb,long res) +static void io_complete_rw_common (struct kiocb *kiocb,long res, +struct list_head *comp_list) { struct io_kiocb *req = container_of(kiocb, struct io_kiocb, rw.kiocb);int cflags =0 ;
@@ -1994,7 +1995,7 @@ static void io_complete_rw_common(struct kiocb *kiocb, long res)req_set_fail_links (req);if (req->flags &REQ_F_BUFFER_SELECTED ) cflags =io_put_kbuf (req); -io_cqring_add_event (req, res, cflags); +__io_req_complete (req, res, cflags, comp_list); }static void io_sq_thread_drop_mm (struct io_ring_ctx *ctx)
@@ -2097,14 +2098,18 @@ static bool io_rw_reissue(struct io_kiocb *req, long res)return false; } +static void __io_complete_rw (struct io_kiocb *req,long res,long res2, +struct list_head *comp_list) +{ +if (!io_rw_reissue (req, res)) +io_complete_rw_common (&req->rw.kiocb, res, comp_list); +} +static void io_complete_rw (struct kiocb *kiocb,long res,long res2) { struct io_kiocb *req = container_of(kiocb, struct io_kiocb, rw.kiocb); -if (!io_rw_reissue (req, res)) { -io_complete_rw_common (kiocb, res); -io_put_req (req); - } +__io_complete_rw (req, res, res2,NULL ); }static void io_complete_rw_iopoll (struct kiocb *kiocb,long res,long res2)
@@ -2338,14 +2343,15 @@ static inline void io_rw_done(struct kiocb *kiocb, ssize_t ret) } } -static void kiocb_done (struct kiocb *kiocb,ssize_t ret) +static void kiocb_done (struct kiocb *kiocb,ssize_t ret, +struct list_head *comp_list) { struct io_kiocb *req = container_of(kiocb, struct io_kiocb, rw.kiocb);if (req->flags &REQ_F_CUR_POS ) req->file->f_pos = kiocb->ki_pos;if (ret >=0 && kiocb->ki_complete == io_complete_rw) -io_complete_rw (kiocb, ret,0 ); +__io_complete_rw (req, ret,0 , comp_list);else io_rw_done (kiocb, ret); }
@@ -2881,7 +2887,8 @@ static int io_iter_do_read(struct io_kiocb *req, struct iov_iter *iter)return loop_rw_iter (READ , req->file, &req->rw.kiocb, iter); } -static int io_read (struct io_kiocb *req,bool force_nonblock) +static int io_read (struct io_kiocb *req,bool force_nonblock, +struct list_head *comp_list) {struct iovec inline_vecs[UIO_FASTIOV ], *iovec = inline_vecs;struct kiocb *kiocb = &req->rw.kiocb;
@@ -2916,7 +2923,7 @@ static int io_read(struct io_kiocb *req, bool force_nonblock)/* Catch -EAGAIN return for forced non-blocking submission */ if (!force_nonblock || (ret2 != -EAGAIN && ret2 != -EIO )) { -kiocb_done (kiocb, ret2); +kiocb_done (kiocb, ret2, comp_list); }else { iter.count = iov_count; iter.nr_segs = nr_segs;
@@ -2931,7 +2938,7 @@ static int io_read(struct io_kiocb *req, bool force_nonblock)if (ret2 == -EIOCBQUEUED ) { goto out_free; }else if (ret2 != -EAGAIN ) { -kiocb_done (kiocb, ret2); +kiocb_done (kiocb, ret2, comp_list); goto out_free; } }
@@ -2977,7 +2984,8 @@ static int io_write_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe,return 0 ; } -static int io_write (struct io_kiocb *req,bool force_nonblock) +static int io_write (struct io_kiocb *req,bool force_nonblock, +struct list_head *comp_list) {struct iovec inline_vecs[UIO_FASTIOV ], *iovec = inline_vecs;struct kiocb *kiocb = &req->rw.kiocb;
@@ -3046,7 +3054,7 @@ static int io_write(struct io_kiocb *req, bool force_nonblock)if (ret2 == -EOPNOTSUPP && (kiocb->ki_flags &IOCB_NOWAIT )) ret2 = -EAGAIN ;if (!force_nonblock || ret2 != -EAGAIN ) { -kiocb_done (kiocb, ret2); +kiocb_done (kiocb, ret2, comp_list); }else { iter.count = iov_count; iter.nr_segs = nr_segs;
@@ -5372,7 +5380,7 @@ static int io_issue_sqe(struct io_kiocb *req, const struct io_uring_sqe *sqe,if (ret <0 )break ; } - ret =io_read (req, force_nonblock); + ret =io_read (req, force_nonblock, comp_list);break ;case IORING_OP_WRITEV :case IORING_OP_WRITE_FIXED :
@@ -5382,7 +5390,7 @@ static int io_issue_sqe(struct io_kiocb *req, const struct io_uring_sqe *sqe,if (ret <0 )break ; } - ret =io_write (req, force_nonblock); + ret =io_write (req, force_nonblock, comp_list);break ;case IORING_OP_FSYNC :if (sqe) {
Signature · 1 line
2.27.0
From b26f6d418de1a69c22d0263e1ca05a8903216dfb Mon Sep 17 00:00:00 2001
From: Jens Axboe <[email protected]>
Date: Mon, 22 Jun 2020 10:13:11 -0600
Subject: [PATCH 4/5] io_uring: pass in 'comp_list' to appropriate issue side
handlers
Provide the completion list to the handlers that we know can complete inline, so they can utilize this for batching completions.
--- fs/io_uring.c | 97 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 57 insertions(+), 40 deletions(-)
fs/io_uring.c +57 -40
308 lines not on this page · raw message
Signature · 1 line
2.27.0
From ac8ce673e64582266e8ce4d35f3e92331efee8dc Mon Sep 17 00:00:00 2001
From: Jens Axboe <[email protected]>
Date: Mon, 22 Jun 2020 09:34:30 -0600
Subject: [PATCH 3/5] io_uring: pass down 'comp_list' to issue side
No functional changes in this patch, just in preparation for having the completion list be available on the issue side. Later on, this will allow requests that complete inline to be completed in batches.
--- fs/io_uring.c | 66 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 17 deletions(-)
fs/io_uring.c +49 -17
172 lines not on this page · raw message
Signature · 1 line
2.27.0
From 9eca18f0e902d5fa009dec2867548af6ee5b1da8 Mon Sep 17 00:00:00 2001
From: Jens Axboe <[email protected]>
Date: Mon, 22 Jun 2020 09:29:15 -0600
Subject: [PATCH 2/5] io_uring: add 'comp_list' to io_submit_state
No functional changes in this patch, just in preparation for passing back pending completions to the caller.
--- fs/io_uring.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
fs/io_uring.c +7 -2
@@ -681,6 +681,9 @@ struct io_kiocb {struct io_submit_state {struct blk_plug plug; +struct list_head comp_list; +struct io_ring_ctx *ctx; +/* * io_kiocb alloc cache */
@@ -5999,12 +6002,14 @@ static void io_submit_state_end(struct io_submit_state *state)* Start submission side cache. */ static void io_submit_state_start (struct io_submit_state *state, -unsigned int max_ios) +struct io_ring_ctx *ctx,unsigned int max_ios) {blk_start_plug (&state->plug);#ifdef CONFIG_BLOCK state->plug.nowait = true;#endif +INIT_LIST_HEAD (&state->comp_list); + state->ctx = ctx; state->free_reqs =0 ; state->file =NULL ; state->ios_left = max_ios;
@@ -6139,7 +6144,7 @@ static int io_submit_sqes(struct io_ring_ctx *ctx, unsigned int nr,if (!percpu_ref_tryget_many (&ctx->refs, nr))return -EAGAIN ; -io_submit_state_start (&state, nr); +io_submit_state_start (&state, ctx, nr); ctx->ring_fd = ring_fd; ctx->ring_file = ring_file;
Signature · 1 line
2.27.0
From 55115277bf8e45d9e2a017670b304b1ab7019724 Mon Sep 17 00:00:00 2001
From: Jens Axboe <[email protected]>
Date: Mon, 22 Jun 2020 09:17:17 -0600
Subject: [PATCH 1/5] io_uring: provide generic io_req_complete() helper
We have lots of callers of:
io_cqring_add_event(req, result);io_put_req(req);
Provide a helper that does this for us. It helps clean up the code, and also provides a more convenient location for us to change the completion handling.
--- fs/io_uring.c | 106 ++++++++++++++++++++------------------------------ 1 file changed, 43 insertions(+), 63 deletions(-)
fs/io_uring.c +43 -63
324 lines not on this page · raw message
Signature · 1 line
2.27.0
Quoted 74 lines · Jens Axboe
Quoted 73 lines · Jens Axboe
Quoted 44 lines · Xuan Zhuo
Hi Jens,
I found a problem, and I think it is necessary to solve it. But the change may be relatively large, so I would like to ask you and everyone for your opinions. Or everyone has other ideas about this issue:Problem description:
===================
I found that in the sq thread mode, the CPU used byio_commit_cqringand__io_cqring_fill_eventaccounts for a relatively large amount. The reason is because a large number of calls tosmp_store_releaseandWRITE_ONCE. These two functions are relatively slow, and we need to callsmp_store_releaseevery time we submit a cqe. This large number of calls has caused this problem to become very prominent.My test environment is in qemu, using
io_uringto accept a large number of udp packets in sq thread mode, the speed is 800000pps. I submitted 100 sqes to recv udp packet at the beginning of the application, and every time I received a cqe, I submitted another sqe. The perf top result of sq thread is as follows:17.97% [kernel] [k]
copy_user_generic_unrolled
13.92% [kernel] [k]io_commit_cqring
11.04% [kernel] [k]__io_cqring_fill_event
10.33% [kernel] [k]udp_recvmsg
5.94% [kernel] [k]skb_release_data
4.31% [kernel] [k]udp_rmem_release
2.68% [kernel] [k]__check_object_size
2.24% [kernel] [k]__slab_free
2.22% [kernel] [k]_raw_spin_lock_bh
2.21% [kernel] [k]kmem_cache_free
2.13% [kernel] [k]free_pcppages_bulk
1.83% [kernel] [k]io_submit_sqes
1.38% [kernel] [k]page_frag_free
1.31% [kernel] [k]inet_recvmsgIt can be seen that
io_commit_cqringand__io_cqring_fill_eventaccount for 24.96%. This is too much. In general, the proportion of syscall may not be so high, so we must solve this problem.Quoted 7 lines
Solution:
=================
I consider that when the nr of anio_submit_sqesis too large, we don't callio_cqring_add_eventdirectly, we can put the completed req in the queue, and then call__io_cqring_fill_eventfor each req then call onceio_commit_cqringat the end of theio_submit_sqesfunction. In this way my local simple test looks good.I think the solution here is to defer the cq ring filling + commit to the caller instead of deep down the stack, I think that's a nice win in general. To do that, we need to be able to do it after
io_submit_sqes()has been called. We can either do that inline, by passing down a list or struct that allows the caller to place the request there instead of filling the event, or out-of-band by having eg a percpu struct that allows the same thing. In both cases, the actual call site would do something ala:if (comp_list && successful_completion) { req->result = ret; list_add_tail(&req->list, comp_list); } else { io_cqring_add_event(req, ret); if (!successful_completion) req_set_fail_links(req); io_put_req(req); }and then have the caller iterate the list and fill completions, if it's non-empty on return.
Quoted 9 lines
Quoted 4 lines
I don't think this is necessarily hard, but to do it nicely it will touch a bunch code and hence be quite a bit of churn. I do think the reward is worth it though, as this applies to the "normal" submission path as well, not just the SQPOLL variant.
Something like this series. I'd be interested to hear if it makes your specific test case any better.
Patches are against my for-5.9/io_uring branch.
I applied your patches on for-5.9/io_uring and performed the same test. The data of io_sq_thread perf top is as follows:
19.99% [kernel] [k] copy_user_generic_unrolled
11.63% [kernel] [k] skb_release_data
9.36% [kernel] [k] udp_rmem_release
8.64% [kernel] [k] udp_recvmsg
6.21% [kernel] [k] __slab_free
4.39% [kernel] [k] __check_object_size
3.64% [kernel] [k] free_pcppages_bulk
2.41% [kernel] [k] kmem_cache_free
2.00% [kernel] [k] io_submit_sqes
1.95% [kernel] [k] page_frag_free
1.54% [kernel] [k] io_put_req
...
0.07% [kernel] [k] io_commit_cqring
0.44% [kernel] [k] __io_cqring_fill_event
The ratio of io_commit_cqring and __io_cqring_fill_event has been significantly reduced.
Due to the kernel of this version, setting the irq smb_affinity of the network card has no effect, so the lock competition of udp receiving packets is relatively large, which may be a bug. This leads to a large fluctuation in throughput, so I not provide UDP packet receiving bandwidth.
Well done.
Quoted 7 lines · Jens Axboe
Quoted 7 lines
I think the solution here is to defer the cq ring filling + commit to the caller instead of deep down the stack, I think that's a nice win in general. To do that, we need to be able to do it after
io_submit_sqes()has been called. We can either do that inline, by passing down a list or struct that allows the caller to place the request there instead of filling the event, or out-of-band by having eg a percpu struct that allows the same thing. In both cases, the actual call site would do something ala:
I had similar stuff long ago but with a different premise -- it was defer-batching io_put_req() without *fill_event(). It also helped to rework synchronisation and reduce # of atomics, and allowed req reuse. Probably, easier to revive if this sees the light.
Quoted 10 lines
Quoted 10 lines
if (comp_list && successful_completion) { req->result = ret; list_add_tail(&req->list, comp_list); } else { io_cqring_add_event(req, ret); if (!successful_completion) req_set_fail_links(req); io_put_req(req); }
Quoted 7 lines
Quoted 7 lines
and then have the caller iterate the list and fill completions, if it's non-empty on return.
I don't think this is necessarily hard, but to do it nicely it will touch a bunch code and hence be quite a bit of churn. I do think the reward is worth it though, as this applies to the "normal" submission path as well, not just the SQPOLL variant.
The obvious problem with CQE batching is latency, and it can be especially bad for SQPOLL. Can be reasonable to add "max batch" parameter to io_uring or along a similar vein.
Signature · 1 line
Pavel Begunkov
Jens Axboe
maintainerQuoted 9 lines · Pavel Begunkov
Quoted 7 lines · Jens Axboe
Quoted 7 lines
I think the solution here is to defer the cq ring filling + commit to the caller instead of deep down the stack, I think that's a nice win in general. To do that, we need to be able to do it after
io_submit_sqes()has been called. We can either do that inline, by passing down a list or struct that allows the caller to place the request there instead of filling the event, or out-of-band by having eg a percpu struct that allows the same thing. In both cases, the actual call site would do something ala:
Quoted 4 lines
I had similar stuff long ago but with a different premise -- it was defer-batching
io_put_req()without*fill_event(). It also helped to rework synchronisation and reduce # of atomics, and allowed req reuse. Probably, easier to revive if this sees the light.
I'm going to polish this series a bit, then post it for review.
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
if (comp_list && successful_completion) { req->result = ret; list_add_tail(&req->list, comp_list); } else { io_cqring_add_event(req, ret); if (!successful_completion) req_set_fail_links(req); io_put_req(req); }and then have the caller iterate the list and fill completions, if it's non-empty on return.
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
I don't think this is necessarily hard, but to do it nicely it will touch a bunch code and hence be quite a bit of churn. I do think the reward is worth it though, as this applies to the "normal" submission path as well, not just the SQPOLL variant.
The obvious problem with CQE batching is latency, and it can be especially bad for SQPOLL. Can be reasonable to add "max batch" parameter to
io_uringor along a similar vein.
Yeah, we need some flush-at-N logic, which probably isn't that critical. 32 or something like that would do nicely, it's small enough to not cause issues, and large enough that we'll amortize the cost of the lock-and-commit dance nicely.
Signature · 1 line
Jens Axboe