On 1/7/25 02:38, Jens Axboe wrote: >> I think this is a valid and reasonable discussion. But maybe we're >> just not on the same page. I don't know anything existing and usable, >> maybe I've just not found it? > > Not that I'm aware of, it was just a suggestion/thought that we could > utilize an existing driver for this, rather than have a separate one. > Yes the proposed one is pretty simple and not large, and maintaining it > isn't a big deal, but it's still a new driver and hence why I was asking > "why can't we just use ublk for this". That also keeps the code mostly > in userspace which is nice, rather than needing kernel changes for new > features, changes, etc. I did consider ublk at some point but did not switch to it because a 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 though as this driver is not intended for production use but rather to be the simplest possible setup that can be used in CI systems to test zoned file systems (among other zone related things). A kernel-based implementation is simpler and the configuration interface literally needs only a single echo bash command to add or remove devices. This allows minimal VM configurations with no dependencies on user tools/libraries to run these zoned devices, which is what we wanted. I completely agree about the user-space vs kernel tradeoff you mentioned. I did consider it but the code simplicity and ease of use in practice won for us and I chose to stick with the kernel driver approach. Note that if you are OK with this, I need to send a V2 to correct the Kconfig description which currently shows an invalid configuration command example. -- Damien Le Moal Western Digital Research