From: "Michael R. Hines" <mrhines@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: aliguori@us.ibm.com, quintela@redhat.com, mst@redhat.com,
qemu-devel@nongnu.org, owasserm@redhat.com, abali@us.ibm.com,
mrhines@us.ibm.com, gokul@us.ibm.com
Subject: Re: [Qemu-devel] [PULL v3 4/7] rdma: core logic
Date: Wed, 17 Apr 2013 14:44:33 -0400 [thread overview]
Message-ID: <516EED91.7090803@linux.vnet.ibm.com> (raw)
In-Reply-To: <516E6867.1070409@redhat.com>
Thanks. Comments inline....
On 04/17/2013 05:16 AM, Paolo Bonzini wrote:
>
> +/*
> + * Create protection domain and completion queues
> + */
> +static int qemu_rdma_alloc_pd_cq(RDMAContext *rdma)
> +{
> + /* allocate pd */
> + rdma->pd = ibv_alloc_pd(rdma->verbs);
> + if (!rdma->pd) {
> + fprintf(stderr, "failed to allocate protection domain\n");
> + return -1;
> + }
> +
> + /* create completion channel */
> + rdma->comp_channel = ibv_create_comp_channel(rdma->verbs);
> + if (!rdma->comp_channel) {
> + fprintf(stderr, "failed to allocate completion channel\n");
> + goto err_alloc_pd_cq;
> + }
> +
> + qemu_set_nonblock(rdma->comp_channel->fd);
> Again showing my lack of IB-fu, do you have to test for POLLOUT
> somewhere too? Or does it just work?
There is no output to that file descriptor - it's strictly used for read()
in order to know when events occur.
I've already incorporated the yield() coroutine patch you requested,
so you'll see it in my next posting.
>> @@ -121,7 +125,6 @@ void process_incoming_migration(QEMUFile *f)
>> Coroutine *co = qemu_coroutine_create(process_incoming_migration_co);
>> int fd = qemu_get_fd(f);
>>
>> - assert(fd != -1);
>> qemu_set_nonblock(fd);
> So in the end you are setting the fd to non-blocking. :)
>
> Please add a get_fd implementation to QEMUFile that returns
> rdma->comp_channel->fd, and leave the assertion in place. The fd will
> be set twice to nonblocking, but that's ok.
Cool. =)
next prev parent reply other threads:[~2013-04-17 18:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-17 4:20 [Qemu-devel] [PULL v3 0/7] rdma: migration support mrhines
2013-04-17 4:20 ` [Qemu-devel] [PULL v3 1/7] rdma: introduce qemu_ram_foreach_block mrhines
2013-04-17 4:20 ` [Qemu-devel] [PULL v3 2/7] rdma: new QEMUFileOps hooks mrhines
2013-04-17 10:13 ` Orit Wasserman
2013-04-17 10:17 ` Paolo Bonzini
2013-04-17 10:29 ` Orit Wasserman
2013-04-17 16:02 ` Michael R. Hines
2013-04-17 4:20 ` [Qemu-devel] [PULL v3 3/7] rdma: introduce capability for chunk registration mrhines
2013-04-17 15:44 ` Eric Blake
2013-04-17 16:00 ` Michael R. Hines
2013-04-17 4:20 ` [Qemu-devel] [PULL v3 4/7] rdma: core logic mrhines
2013-04-17 9:16 ` Paolo Bonzini
2013-04-17 18:44 ` Michael R. Hines [this message]
2013-04-17 11:20 ` Orit Wasserman
2013-04-17 14:09 ` Paolo Bonzini
2013-04-17 19:54 ` Michael R. Hines
2013-04-17 4:20 ` [Qemu-devel] [PULL v3 5/7] rdma: send pc.ram mrhines
2013-04-17 9:35 ` Paolo Bonzini
2013-04-17 4:20 ` [Qemu-devel] [PULL v3 6/7] rdma: print throughput while debugging mrhines
2013-04-17 4:20 ` [Qemu-devel] [PULL v3 7/7] rdma: add documentation mrhines
2013-04-17 15:52 ` Eric Blake
2013-04-17 16:01 ` Michael R. Hines
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=516EED91.7090803@linux.vnet.ibm.com \
--to=mrhines@linux.vnet.ibm.com \
--cc=abali@us.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=gokul@us.ibm.com \
--cc=mrhines@us.ibm.com \
--cc=mst@redhat.com \
--cc=owasserm@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.