On Tue, Oct 08, 2024 at 10:11:35AM +0800, Ming Lei wrote: > Forget to mention, `struct ublk_queue` and `struct ublk_io` are operated > lockless now, since we suppose both two are read/write in single pthread. > > If we kill this limit, READ/WRITE on the two structures have to > protected, which may add extra cost, :-( Argh, yes you're right. Fortunately, ublk_queue looks like it is read-only in the completion path, so we should be able to get away without synchronization there. ublk_io will need some synchronization but with a correctly written ublk server, the synchronization should almost always be uncontended and therefore, hopefully, unnoticeable. I'll see what I can come up with in v2.