On 12/15/20 12:32 PM, Linus Torvalds wrote: > On Tue, Dec 15, 2020 at 11:03 AM Jens Axboe <axboe@xxxxxxxxx> wrote: >> >> And for comparison, doing the same thing with the regular openat2() >> system call takes 867,897 usec. > > Well, you could always thread it. That's what git does for its > 'stat()' loop for 'git diff' and friends (the whole "check that the > index is up-to-date with all the files in the working tree" is > basically just a lot of lstat() calls). Sure, but imho the whole point of LOOKUP_NONBLOCK + io_uring is that you don't have to worry about (or deal with) threading. As the offload numbers prove, offloading when you don't have to is always going to be a big loss. I like the model where the fast path is just done the right way, and the slow path is handled automatically, a whole lot more than chunking it off like that. Granted that's less of an issue if the workload is "stat this crap ton of files", it's more difficult when you're doing it in a more piecemeal fashion as needed. Actually been on my list to use io_uring stat with git, but needed to get the LOOKUP_NONBLOCK done first... -- Jens Axboe