From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQe2X-00069i-GU for qemu-devel@nongnu.org; Fri, 12 Apr 2013 09:29:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQe2U-0002FH-Mc for qemu-devel@nongnu.org; Fri, 12 Apr 2013 09:29:17 -0400 Received: from e38.co.us.ibm.com ([32.97.110.159]:33217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQe2U-0002Dz-GX for qemu-devel@nongnu.org; Fri, 12 Apr 2013 09:29:14 -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 ; Fri, 12 Apr 2013 07:29:11 -0600 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 1728C3E40039 for ; Fri, 12 Apr 2013 07:28:54 -0600 (MDT) Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r3CDT3Kq158934 for ; Fri, 12 Apr 2013 07:29:04 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r3CDT3cK031817 for ; Fri, 12 Apr 2013 07:29:03 -0600 Message-ID: <51680C1D.9050803@linux.vnet.ibm.com> Date: Fri, 12 Apr 2013 09:29:01 -0400 From: "Michael R. Hines" MIME-Version: 1.0 References: <1365745929-24871-3-git-send-email-mrhines@linux.vnet.ibm.com> <5167EBB5.4010005@redhat.com> In-Reply-To: <5167EBB5.4010005@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/8] rdma: core rdma logic 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 04/12/2013 07:10 AM, Paolo Bonzini wrote: > Il 12/04/2013 07:52, mrhines@linux.vnet.ibm.com ha scritto: >> + * >> + * If we're using dynamic registration on the server-side, we have to >> + * send a registration command first. >> + */ >> +static int __qemu_rdma_write(QEMUFile *f, RDMAContext *rdma, >> + int current_index, >> + uint64_t offset, uint64_t length, >> + uint64_t wr_id, enum ibv_send_flags flag) >> +{ > No __ prefix, perhaps call this function qemu_rdma_flush_one? > >> + /* >> + * Don't pin zero pages on the destination. Just return. >> + */ >> + if (rdma->chunk_register_destination && >> + (buffer_find_nonzero_offset(va, size) == size)) { >> + return size; >> + } > Is this the right place to test? Is it correct if a page first is > non-zero and then becomes zero? Perhaps you have to test where you add > a page to a chunk, instead. Oh, thank you. Huge bug - I need to introduce a "COMPRESS" message for this page into the protocol just like we already have for TCP and bypass the current chunk. I knew I was forgetting about compress - some little angel on my shoulder was telling me I forgot something but I couldn't remember =) - Michael