[HN Gopher] I/O Rings: When One I/O Operation is Not Enough
       ___________________________________________________________________
        
       I/O Rings: When One I/O Operation is Not Enough
        
       Author : ingve
       Score  : 27 points
       Date   : 2021-05-24 14:56 UTC (8 hours ago)
        
 (HTM) web link (windows-internals.com)
 (TXT) w3m dump (windows-internals.com)
        
       | Matthias247 wrote:
       | The limitation of "0x10000 operations" (64k) suprises me. Is that
       | what can be submitted at once to the kernel, or also the amount
       | of operations in-flight?
       | 
       | There's certainly a lot of servers out there which have more than
       | 100k connections with low activity (keep-alive between HTTP
       | requests, running messaging protocols, etc), where one read()
       | operation would need to be enqueued for each connection for the
       | case new data arrives or the connection closes. Is this supported
       | or not?
        
         | wtallis wrote:
         | My understanding of io_uring on Linux is that the submission
         | queue only holds the recently-submitted entries that the kernel
         | has not started processing. Once the kernel reads a Submission
         | Queue Entry, it consumes that SQE and keeps track of command
         | status using private memory, and a Completion Queue entry will
         | not appear until the kernel is done handling that IO operation.
         | So the Submission Queue size is not a limitation on how many
         | in-flight/pending IOs there can be, just on how big a batch you
         | can dump on the kernel at once. Of course, the kernel's
         | internal limits on operation state tracking might be smaller or
         | larger than the Submission Queue size.
        
           | Matthias247 wrote:
           | Right. That would make sense. Would be interesting to know
           | what the limit for submitted operations is (if any)
        
       | yxhuvud wrote:
       | Yeah, that design is _very_ similar to io_uring.
        
         | wtallis wrote:
         | Thank goodness. That should minimize porting friction, and help
         | both APIs catch on. I want to see lots of languages offering
         | cross-platform abstractions over these to their standard
         | libraries.
         | 
         | I'm not familiar with the gory details on the Windows side, so
         | can anyone say whether the file handles this API interacts are
         | general enough that this can do or be extended to do network
         | IO, the way io_uring can?
         | 
         | Also, has there been any official confirmation about how this
         | relates to DirectStorage? I've been expecting DirectStorage to
         | include a clone of io_uring, and this seems to fit the bill.
        
       | suifbwish wrote:
       | One of the reasons to have multiple nodes in a cluster is to
       | leverage multiple kernels for processing. Even VMs are bound to
       | whatever linear limits are in place in the hypervisor. I've
       | always thought it would be possible to run a multiple kernel OS
       | in VRAM on a gpu for better processing.
        
         | monocasa wrote:
         | Not sure why you're being downvoted, that's a valid line of
         | thinking that's led to such projects as the Barrelfish kernel.
         | 
         | http://www.barrelfish.org
         | 
         | The GPU side of things might not help you on current hardware
         | because there's still some serial hardware queues, but the
         | general concept of 'don't run kernels on multiple cores to
         | guarantee a lack of software serialization points' is a valid
         | and active area of research.
        
       ___________________________________________________________________
       (page generated 2021-05-24 23:01 UTC)