From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQbsx-0006gi-SA for qemu-devel@nongnu.org; Fri, 12 Apr 2013 07:11:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQbsw-00019V-Ow for qemu-devel@nongnu.org; Fri, 12 Apr 2013 07:11:15 -0400 Received: from mail-qc0-x22d.google.com ([2607:f8b0:400d:c01::22d]:56003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQbsw-00019R-Kp for qemu-devel@nongnu.org; Fri, 12 Apr 2013 07:11:14 -0400 Received: by mail-qc0-f173.google.com with SMTP id b12so1131340qca.4 for ; Fri, 12 Apr 2013 04:11:14 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5167EBB5.4010005@redhat.com> Date: Fri, 12 Apr 2013 13:10:45 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1365745929-24871-3-git-send-email-mrhines@linux.vnet.ibm.com> In-Reply-To: <1365745929-24871-3-git-send-email-mrhines@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 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: mrhines@linux.vnet.ibm.com 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 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. Paolo