On Thu, May 30, 2024 at 03:09:41PM -0400, Josef Bacik wrote: > On Thu, May 30, 2024 at 06:17:29PM +0200, Bernd Schubert wrote: > > > > > > On 5/30/24 18:10, Kent Overstreet wrote: > > > On Thu, May 30, 2024 at 06:02:21PM +0200, Bernd Schubert wrote: > > >> Hmm, initially I had thought about writing my own ring buffer, but then > > >> io-uring got IORING_OP_URING_CMD, which seems to have exactly what we > > >> need? From interface point of view, io-uring seems easy to use here, > > >> has everything we need and kind of the same thing is used for ublk - > > >> what speaks against io-uring? And what other suggestion do you have? > > >> > > >> I guess the same concern would also apply to ublk_drv. > > >> > > >> Well, decoupling from io-uring might help to get for zero-copy, as there > > >> doesn't seem to be an agreement with Mings approaches (sorry I'm only > > >> silently following for now). > > >> > > >> From our side, a customer has pointed out security concerns for io-uring. > > >> My thinking so far was to implemented the required io-uring pieces into > > >> an module and access it with ioctls... Which would also allow to > > >> backport it to RHEL8/RHEL9. > > > > > > Well, I've been starting to sketch out a ringbuffer() syscall, which > > > would work on any (supported) file descriptor and give you a ringbuffer > > > for reading or writing (or call it twice for both). > > > > > > That seems to be what fuse really wants, no? You're already using a file > > > descriptor and your own RPC format, you just want a faster > > > communications channel. > > > > Fine with me, if you have something better/simpler with less security > > concerns - why not. We just need a community agreement on that. > > > > Do you have something I could look at? > > FWIW I have no strong feelings between using iouring vs any other ringbuffer > mechanism we come up with in the future. > > That being said iouring is here now, is proven to work, and these are good > performance improvements. If in the future something else comes along that > gives us better performance then absolutely we should explore adding that > functionality. But this solves the problem today, and I need the problem solved > yesterday, so continuing with this patchset is very much a worthwhile > investment, one that I'm very happy you're tackling Bernd instead of me ;). > Thanks, I suspect a ringbuffer syscall will actually be simpler than switching to io_uring. Let me see if I can cook something up quickly - there's no rocket science here and this all stuff we've done before so it shouldn't take too long (famous last works...)