Io_uring Without Readahead

(frn.sh)

44 points | by porridgeraisin 2 hours ago

1 comments

  • marginalia_nu 8 minutes ago
    If you're doing contiguous readahead in userspace, why not just use preadv? It'll limit you to doing readahead up until the next resident page, but at least in my experiments in Marginalia's index, preadv beats io_uring in all cases you can use a single preadv call to do the full read.
    • vlovich123 0 minutes ago
      Not sure what you mean. Nothing about preadv lets you indicate you only want to read what's already in the page cache. And io_uring and preadv aren't orthogonal - you can give io_uring a preadv op to do the scattered read instead of issuing separate read OPs although I'm not 100% sure how much of a win that is in practice.

      Also, I think you misunderstood the blog as it's describing application read-ahead which is what you have to do when using O_DIRECT.