summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRoman Penyaev <rpenyaev@suse.de>2019-05-27 21:05:12 +0200
committerJens Axboe <axboe@kernel.dk>2019-05-27 14:54:18 -0600
commitf3b78a78240e2cf8826291501f9ee3f2112e7dfe (patch)
treea6049ff2ae436238267e54492db822e1542170fe /test
parente60729e64189c908c61254e9743daee7db47f88f (diff)
liburing: introduce io_uring_for_each_cqe() and io_uring_cq_advance()
io_uring_cqe_seen() contains write memory barrier (at least for !x86), so calling it can be very expensive for a big number of cqes. Would be better to have a loop over all available cqes and only then advance the cq ring once, e.g.: struct io_uring_cqe *cqe; unsigned nr, head; nr = 0; io_uring_for_each_cqe(&ring, head, cqe) { /* handle cqe */ if (++nr == max) break; } io_uring_cq_advance(&ring, nr); Signed-off-by: Roman Penyaev <rpenyaev@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions