←back to thread

lsr: ls with io_uring

(rockorager.dev)
335 points mpweiher | 1 comments | | HN request time: 0s | source
Show context
rockorager ◴[] No.44606061[source]
Author of the project here! I have a little write up on this here: https://rockorager.dev/log/lsr-ls-but-with-io-uring
replies(6): >>44606274 #>>44606605 #>>44607773 #>>44607936 #>>44608619 #>>44609311 #
tavianator ◴[] No.44606605[source]
My bfs project also uses io_uring: https://github.com/tavianator/bfs/blob/main/src/ioq.c

I'm curious how lsr compares to bfs -ls for example. bfs only uses io_uring when multiple threads are enabled, but maybe it's worth using it even for bfs -j1

replies(1): >>44606774 #
rockorager ◴[] No.44606774[source]
Oh that's cool. `find` is another tool I thought could benefit from io_uring like `ls`. I think it's definitely worth enabling io_uring for single threaded applications for the batching benefit. The kernel will still spin up a thread pool to get the work done concurrently, but you don't have to manage that in your codebase.
replies(2): >>44607073 #>>44607227 #
1. tavianator ◴[] No.44607073[source]
I did try it a while ago and it wasn't profitable, but that was before I added stat() support. Batching those is probably good