From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933691AbaFQQAq (ORCPT ); Tue, 17 Jun 2014 12:00:46 -0400 Received: from mail-qa0-f41.google.com ([209.85.216.41]:58393 "EHLO mail-qa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933015AbaFQQAo (ORCPT ); Tue, 17 Jun 2014 12:00:44 -0400 Date: Tue, 17 Jun 2014 12:00:40 -0400 From: Tejun Heo To: Christoph Lameter Cc: "Paul E. McKenney" , David Howells , Linus Torvalds , Andrew Morton , Oleg Nesterov , linux-kernel@vger.kernel.org, Rusty Russell Subject: Re: [PATCH RFC] percpu: add data dependency barrier in percpu accessors and operations Message-ID: <20140617160040.GE31819@htj.dyndns.org> References: <20140612135630.GA23606@htj.dyndns.org> <20140612153426.GV4581@linux.vnet.ibm.com> <20140612155227.GB23606@htj.dyndns.org> <20140617144151.GD4669@linux.vnet.ibm.com> <20140617152752.GC31819@htj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Christoph. On Tue, Jun 17, 2014 at 10:56:10AM -0500, Christoph Lameter wrote: > Uhhh no. The percpu stuff and the associated per cpu atomics are to be > used for stuff that is per cpu specific and runs at the fastest speed > doable at that level. Introducing implicit barriers is not that good an > idea. Hmmm? Read barriers are noops on all archs except for alpha and percpu pointer assignments aren't exactly a high frequency operation and I'm pretty sure we'll end up with a raw variant anyway. > The concurrency guarantees for the per cpu operations are related to being > interrupted or rescheduled but not for accesses from other processors. > > Cpus maintain at least the appearance of operations being visible in > sequence for code running on the same processor. Therefore no barriers are > needed. Huh? We're talking about percpu *pointer* assignments not assignments to percpu areas. Thanks. -- tejun