News for hackers. Stuff that matters.
Re:lsr: ls with io_uring by porridgeraisin on Friday July 18, 2025 @02:41PM (#44608321)
Curious: Why? Is it not a good fit for what ripgrep does? Isn't the sort of "streaming" "line at a time" I/O that ripgrep does a good fit for async io?
Re:lsr: ls with io_uring by burntsushi on Friday July 18, 2025 @03:35PM (#44608899)
For many workloads, ripgrep spends the vast majority of its time searching through files.

But more practically, it would be a terror to implement. ripgrep is built on top of platform specific standard file system APIs. io_uring would mean a whole heap of code to work with a different syscall pattern in addition to the existing code pattern for non-Linux targets.

So to even figure out whether it would be worth doing that, you would need to do a whole bunch of work just to test it. And because of my first point above, there is a hard limit on how much of an impact it could even theoretically have.

Where I would expect this to help is to batch syscalls during directory tree traversal. But I have nonidea how much it would help, if at all.

Re:lsr: ls with io_uring by Sesse__ on Friday July 18, 2025 @05:58PM (#44610266)
I believe that io_uring does not support getdents (despite multiple patch series being proposed). So you'd get async stat(), if you need them, but nothing else.
Re:lsr: ls with io_uring by burntsushi on Saturday July 19, 2025 @08:37PM (#44620839)
Oh. Well, that's definitely a deal breaker then. ripgrep already avoids stat calls on most files.