From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHwIF-0006wS-1Y for qemu-devel@nongnu.org; Tue, 19 Mar 2013 09:09:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHwI5-000248-74 for qemu-devel@nongnu.org; Tue, 19 Mar 2013 09:09:30 -0400 Received: from e38.co.us.ibm.com ([32.97.110.159]:38510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHwI4-000224-UH for qemu-devel@nongnu.org; Tue, 19 Mar 2013 09:09:21 -0400 Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Mar 2013 07:09:18 -0600 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 956E23E40039 for ; Tue, 19 Mar 2013 07:08:48 -0600 (MDT) Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r2JD8qqg037528 for ; Tue, 19 Mar 2013 07:08:53 -0600 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r2JDBQmx000376 for ; Tue, 19 Mar 2013 07:11:27 -0600 Message-ID: <5148635E.3030508@linux.vnet.ibm.com> Date: Tue, 19 Mar 2013 09:08:46 -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> <51477B1C.5060602@linux.vnet.ibm.com> <51482EA6.7020501@redhat.com> In-Reply-To: <51482EA6.7020501@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 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. > 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.