From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [RFC PATCH 0/3] io/nbd: AioContext support
Date: Fri, 23 Dec 2016 19:26:38 +0100 [thread overview]
Message-ID: <20161223182641.2718-1-pbonzini@redhat.com> (raw)
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
next reply other threads:[~2016-12-23 18:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-23 18:26 Paolo Bonzini [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161223182641.2718-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).