On 6/4/19 4:59 AM, Richard W.M. Jones wrote:
Since Eric's improvements to the command queue in commit 6af72b8 (and following) there's now a queue of commands waiting to be issued stored in the handle, and there's no need to issue commands only from the ready state. We can therefore remove the want_to_send logic, queue as many commands as possible, and don't need to test if the socket is ready for POLLOUT.
This commit also removes some misleading comments, improves the documentation, and increases the limit on commands in flight (since this limit is effectively in place to stop memory exhaustion, not because of server limits). --- docs/libnbd.pod | 9 ++-- examples/threaded-reads-and-writes.c | 65 +++++++++++----------------- tests/aio-parallel-load.c | 56 ++++++++++-------------- tests/aio-parallel-tls.sh | 2 +- tests/aio-parallel.c | 58 +++++++++++-------------- tests/aio-parallel.sh | 2 +- 6 files changed, 83 insertions(+), 109 deletions(-)
ACK -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org