[Libguestfs] [nbdkit PATCH 3/3] server: Add and use nbdkit_nanosleep

Richard W.M. Jones rjones at redhat.com
Tue Aug 6 06:49:18 UTC 2019


In response to IRC:

03:29 < eblake> Our blocking I/O in nbdkit is getting a bit akward - we're pre-spawning threads that may not be utilized, and they are all contending on a 
                blocking read() with first one to see data winning
03:29 < eblake> I'm half-tempted to use a proper non-blocking event queue, farming out plugin calls to worker threads spun up on demand, and integrating 
                nbdkit_nanosleep into the event loop proper,
03:32 < eblake> with the hope that we can read() EOF from the client as soon as it hangs up, even if we can't farm out to the worker thread due to the thread model
03:32 < eblake> whereas now we don't read() from the client until the plugin returns when serializing

I always thought/hoped this was the long term plan.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list