From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHgog-0007WG-13 for qemu-devel@nongnu.org; Mon, 18 Mar 2013 16:38:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHgoZ-0006RM-Tz for qemu-devel@nongnu.org; Mon, 18 Mar 2013 16:37:57 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:45030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHgoZ-0006RG-PG for qemu-devel@nongnu.org; Mon, 18 Mar 2013 16:37:51 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Mar 2013 16:37:51 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 572D338C804F for ; Mon, 18 Mar 2013 16:37:49 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r2IKbnKq299194 for ; Mon, 18 Mar 2013 16:37:49 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r2IKbnDY003718 for ; Mon, 18 Mar 2013 17:37:49 -0300 Message-ID: <51477B1C.5060602@linux.vnet.ibm.com> Date: Mon, 18 Mar 2013 16:37:48 -0400 From: "Michael R. Hines" MIME-Version: 1.0 References: <1363576743-6146-1-git-send-email-mrhines@linux.vnet.ibm.com> <1363576743-6146-10-git-send-email-mrhines@linux.vnet.ibm.com> <5146D4A8.7040500@redhat.com> In-Reply-To: <5146D4A8.7040500@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH RDMA support v4: 09/10] check for QMP string and bypass nonblock() calls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: aliguori@us.ibm.com, mst@redhat.com, qemu-devel@nongnu.org, owasserm@redhat.com, abali@us.ibm.com, mrhines@us.ibm.com, gokul@us.ibm.com Comments inline....... On 03/18/2013 04:47 AM, Paolo Bonzini wrote: > int migrate_use_xbzrle(void); > +void *migrate_use_rdma(QEMUFile *f); > Perhaps you can add a new function to QEMUFile send_page? And if it > returns -ENOTSUP, proceed with the normal is_dup_page + put_buffer. I > wonder if that lets use remove migrate_use_rdma() completely. That's great - I'll make the modification...... > void process_incoming_migration(QEMUFile *f) > { > Coroutine *co = qemu_coroutine_create(process_incoming_migration_co); > - int fd = qemu_get_fd(f); > - > - assert(fd != -1); > - socket_set_nonblock(fd); > + if(!migrate_use_rdma(f)) { > + int fd = qemu_get_fd(f); > + assert(fd != -1); > + socket_set_nonblock(fd); > Is this because qemu_get_fd(f) returns -1 for RDMA? Then, you can > instead put socket_set_nonblock under an if(fd != -1). Yes, I proposed doing that check (for -1) in a previous RFC, but you told me to remove it and make a separate patch =) Is it OK to keep it in this patch? > Otherwise looks good. Thanks for taking the time =)