Received: from eggs.gnu.org ([2001:4830:134:3::10]:56129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfTdQ-00045D-Bt for qemu-devel@nongnu.org; Thu, 01 Sep 2016 11:10:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfTdK-0001SB-As for qemu-devel@nongnu.org; Thu, 01 Sep 2016 11:10:31 -0400 Sender: Paolo Bonzini References: <20160831222909.26983-1-bobby.prani@gmail.com> <73565fc1-8d02-bae1-42b0-c03ed7c73a09@redhat.com> From: Paolo Bonzini Message-ID: <8da95bee-e291-52e1-0866-fec0328f441a@redhat.com> Date: Thu, 1 Sep 2016 17:10:14 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] aio: Remove spurious smp_read_barrier_depends() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pranith Kumar Cc: Fam Zheng , "open list:Block I/O path" , Stefan Hajnoczi , "open list:All patches CC here" On 01/09/2016 16:40, Pranith Kumar wrote: >> > >> > bh is shared since it is equal to ctx->first_bh or >> > ctx->first_bh->...->next. While the compiler will always order the load >> > of bh->next after the load of ctx->first_bh and any previous load of >> > bh->next, this may not be the case for the processor. Only the DEC >> > Alpha has this behavior, but it _can_ happen. > In that case there are a bunch of places in the same file where we > need to insert this barrier. I also guarantee that there are many more > files which would need this barrier if we examine closely. If it's protected by a lock, it's not necessary. If you don't like smp_read_barrier_depends, you can introduce a synonym for atomic_rcu_read with another name. But the functionality is required. Paolo