From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qz9D1-0002ym-3v for qemu-devel@nongnu.org; Thu, 01 Sep 2011 11:29:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qz9Cz-0002dC-VG for qemu-devel@nongnu.org; Thu, 01 Sep 2011 11:29:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qz9Cz-0002cy-KI for qemu-devel@nongnu.org; Thu, 01 Sep 2011 11:29:37 -0400 Date: Thu, 1 Sep 2011 18:30:21 +0300 From: "Michael S. Tsirkin" Message-ID: <20110901153020.GB10989@redhat.com> References: <1314857389-13363-1-git-send-email-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1314857389-13363-1-git-send-email-david@gibson.dropbear.id.au> Subject: Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: aliguori@us.ibm.com, aik@ozlabs.ru, rusty@rustcorp.com.au, qemu-devel@nongnu.org, agraf@suse.de, pbonzini@redhat.com On Thu, Sep 01, 2011 at 04:09:49PM +1000, David Gibson wrote: > The virtio code already has memory barrier wmb() macros in the code. > However they are was defined as no-ops. The comment claims that real > barriers are not necessary because the code does not run concurrent. > However, with kvm and io-thread enabled, this is not true and this qemu > code can indeed run concurrently with the guest kernel. This does not > cause problems on x86 due to it's strongly ordered storage model, but it > causes a race leading to virtio errors on POWER which has a relaxed storage > ordering model. Why not limit the change to ppc then? -- MST