From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDzBt-0002CU-IK for qemu-devel@nongnu.org; Tue, 18 Sep 2012 10:54:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDzBs-0005ad-Cp for qemu-devel@nongnu.org; Tue, 18 Sep 2012 10:54:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDzBs-0005aR-40 for qemu-devel@nongnu.org; Tue, 18 Sep 2012 10:54:20 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8IEsJMq013969 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 Sep 2012 10:54:19 -0400 Message-ID: <50588B14.4080303@redhat.com> Date: Tue, 18 Sep 2012 16:54:12 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1347968442-8860-1-git-send-email-kwolf@redhat.com> <1347968442-8860-15-git-send-email-kwolf@redhat.com> <50588626.2030109@redhat.com> In-Reply-To: <50588626.2030109@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 14/16] qcow2: Execute run_dependent_requests() without lock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Am 18.09.2012 16:33, schrieb Paolo Bonzini: > Il 18/09/2012 13:40, Kevin Wolf ha scritto: >> static void run_dependent_requests(BDRVQcowState *s, QCowL2Meta *m) >> { >> - /* Take the request off the list of running requests */ >> - if (m->nb_clusters != 0) { >> - QLIST_REMOVE(m, next_in_flight); >> - } >> - >> /* Restart all dependent requests */ >> if (!qemu_co_queue_empty(&m->dependent_requests)) { >> - qemu_co_mutex_unlock(&s->lock); >> qemu_co_queue_restart_all(&m->dependent_requests); >> - qemu_co_mutex_lock(&s->lock); >> } > > The comment and if can go away. Ah, yes. And the one remaining line can be open coded in the two callers. > Perhaps this patch could be moved earlier in the series? (Just asking, > in case the rebase is not too painful). I'll check how painful it becomes. I'd expect it's doable. Kevin