From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tuk5p-0003FG-EH for qemu-devel@nongnu.org; Mon, 14 Jan 2013 08:29:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tuk5j-0003w4-DG for qemu-devel@nongnu.org; Mon, 14 Jan 2013 08:28:49 -0500 Received: from mail-qc0-f170.google.com ([209.85.216.170]:64538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tuk5j-0003vw-5a for qemu-devel@nongnu.org; Mon, 14 Jan 2013 08:28:43 -0500 Received: by mail-qc0-f170.google.com with SMTP id d42so2512011qca.1 for ; Mon, 14 Jan 2013 05:28:42 -0800 (PST) Sender: Paolo Bonzini Message-ID: <50F40804.2010504@redhat.com> Date: Mon, 14 Jan 2013 14:28:36 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1355319999-30627-1-git-send-email-pbonzini@redhat.com> <1355319999-30627-12-git-send-email-pbonzini@redhat.com> <20130114125610.GA18147@stefanha-thinkpad.redhat.com> In-Reply-To: <20130114125610.GA18147@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 11/20] mirror: support more than one in-flight AIO operation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com Il 14/01/2013 13:56, Stefan Hajnoczi ha scritto: >> > + /* Wait for I/O to this cluster (from a previous iteration) to be done. */ >> > + while (test_bit(cluster_num, s->in_flight_bitmap)) { >> > + trace_mirror_yield_in_flight(s, sector_num, s->in_flight); >> > + qemu_coroutine_yield(); >> > } > in_flight_bitmap is never set in this patch. Either you'll set it in a > later patch or this is a bug? Yes, this must be a rebase bug. Good catch. I'll send an updated series tomorrow. > Why can we get away with testing only cluster_num and not all bits up to > and including cluster_num + nb_chunks? Is there an assumption that > requests are issued in ascending order? As of this patch, cluster_num is either a single granularity-sized cluster or it is rounded to include a full image cluster. If it is rounded, any other concurrent operation will do the same rounding and set the bit corresponding to cluster_num. In the next patch, the same applies when each granularity-sized cluster is added to the current operation (either alone, or rounded to include a full image cluster). I'll add a comment. Paolo