From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHwUB-0004T7-D6 for qemu-devel@nongnu.org; Tue, 19 Mar 2013 09:21:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHwU4-0006rz-IL for qemu-devel@nongnu.org; Tue, 19 Mar 2013 09:21:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHwU4-0006rp-9h for qemu-devel@nongnu.org; Tue, 19 Mar 2013 09:21:44 -0400 Message-ID: <5148662F.1080300@redhat.com> Date: Tue, 19 Mar 2013 14:20:47 +0100 From: Paolo Bonzini 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> <51477B1C.5060602@linux.vnet.ibm.com> <51482EA6.7020501@redhat.com> <5148635E.3030508@linux.vnet.ibm.com> In-Reply-To: <5148635E.3030508@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 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: "Michael R. Hines" 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 Il 19/03/2013 14:08, Michael R. Hines ha scritto: > On 03/19/2013 05:23 AM, Paolo Bonzini wrote: >> >> Yes---this is a separate patch. Apologies if you had the if(fd != -1) >> before. :) In fact, both the if(fd != -1) and the >> if(!migrate_use_rdma(f)) are bad, but I prefer to eliminate as many uses >> as possible of migrate_use_rdma. > I agree. In my current patch I've eliminated all of them. Very nice. It remains to be seen how many are replaced by checks on the QEMUFileOps :) but it cannot be worse! >> Does librdmacm support non-blocking operation, similar to select() or >> poll()? Perhaps we can add support for that later. > > Yes, it does, actually. The library provides what is called an "event > channel". > (This term is overloaded by other technologies, but that's OK). > > An event channel is a file descriptor provided by (I believe) the rdma_cm > kernel module driver. > > When you poll on this file descriptor, it can tell you all sorts of things > just like other files or sockets like when data is ready or when > events of interest have completed (like the completion queue has elements). > > In my current patch, I'm using this during > "rdma_accept_incoming_connection()", > but I'm not currently using it for the rest of the coroutine on the > receiver side. Ok, this can be added later. Paolo