mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
perf(mdbx): fire-and-forget io_uring prefault (non-blocking)
Don't wait for io_uring completions - submit and continue immediately. Pages will be resident by time cursor_put needs them, or soft fault handles it. Overlaps prefault I/O with actual cursor work.
This commit is contained in:
@@ -15940,14 +15940,10 @@ static void subtxn_prefault_own_arena(MDBX_txn *subtxn) {
|
||||
}
|
||||
|
||||
io_uring_submit(&ring);
|
||||
|
||||
struct io_uring_cqe *cqe;
|
||||
for (size_t i = 0; i < npages; ++i) {
|
||||
if (io_uring_wait_cqe(&ring, &cqe) < 0)
|
||||
break;
|
||||
io_uring_cqe_seen(&ring, cqe);
|
||||
}
|
||||
|
||||
|
||||
/* Fire-and-forget: don't wait for completions.
|
||||
* Pages will be resident by time we need them, or soft fault handles it.
|
||||
* This overlaps I/O with actual cursor work. */
|
||||
io_uring_queue_exit(&ring);
|
||||
subtxn->tw.subtxn_arena_prefaulted = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user