qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 0/3] io/nbd: AioContext support
@ 2016-12-23 18:26 Paolo Bonzini
  2016-12-23 18:26 ` [Qemu-devel] [PATCH 1/3] io: add methods to set I/O handlers on AioContext Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Paolo Bonzini @ 2016-12-23 18:26 UTC (permalink / raw)
  To: qemu-devel

This is RFC because the APIs it uses (aio_co_schedule/aio_co_wake) do
not exist yet in master, but it should be enough for a first review of
the QIOChannel API concepts and to give an idea of their usage.

It makes qio_channel_yield aware of AioContexts by adding a new
API qio_channel_set_aio_context, and it lets separate coroutines
use qio_channel_yield for reading vs. writing.

The last patch rewrites the NBD client's I/O management to use the
new infrastructure (and I think the logic here was first proposed
years ago by Stefan).  The benefit is that the new version does not
block if the server writes a partial reply header, and is also a
bit smaller.

Paolo

Paolo Bonzini (3):
  io: add methods to set I/O handlers on AioContext
  io: make qio_channel_yield aware of AioContexts
  nbd: do not block on partial reply header reads

 block/nbd-client.c   | 108 ++++++++++++++++++++-------------------------------
 include/io/channel.h |  41 +++++++++++++++++++
 io/channel-socket.c  |  16 +++++---
 io/channel-tls.c     |  12 ++++++
 io/channel-watch.c   |   6 +++
 io/channel.c         |  87 +++++++++++++++++++++++++++++++----------
 6 files changed, 178 insertions(+), 92 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-01-16 13:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-23 18:26 [Qemu-devel] [RFC PATCH 0/3] io/nbd: AioContext support Paolo Bonzini
2016-12-23 18:26 ` [Qemu-devel] [PATCH 1/3] io: add methods to set I/O handlers on AioContext Paolo Bonzini
2017-01-04 16:45   ` Eric Blake
2017-01-04 16:56     ` Paolo Bonzini
2017-01-04 17:14   ` Daniel P. Berrange
2016-12-23 18:26 ` [Qemu-devel] [PATCH 2/3] io: make qio_channel_yield aware of AioContexts Paolo Bonzini
2017-01-04 17:18   ` Daniel P. Berrange
2017-01-04 21:26     ` Paolo Bonzini
2017-01-05 10:26       ` Daniel P. Berrange
2017-01-05 10:46         ` Paolo Bonzini
2016-12-23 18:26 ` [Qemu-devel] [PATCH 3/3] nbd: do not block on partial reply header reads Paolo Bonzini
2017-01-04 17:36   ` Eric Blake
2017-01-16 13:17   ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).