On Tue, Jan 07, 2025 at 02:08:20PM -0700, Jens Axboe wrote: > > ublk backend driver to do the same as zloop in userspace would need a > > lot more code to be efficient. And even then, as Christoph already > > mentioned, we would still have performance suffer from the context > > switches. But that performance point was not the primary stopper > > I don't buy this context switch argument at all. The zloop write goes straight from kblockd into the the filesystem. ublk switches to userspace, which goes back to the kernel when the file system writes. Similar double context switch on the completion side. > Why would it mean more > sleeping? ? > There's absolutely zero reason why a ublk solution would be at > least as performant as the kernel one. Well, prove it. From haing worked on similar schemes in the past I highly doubt it. > And why would it need "a lot more code to be efficient"? Because we don't have all the nice locking and even infrastructure in userspace that we have in the kernel.