Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752924AbbF2PO0 (ORCPT ); Mon, 29 Jun 2015 11:14:26 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:44016 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbbF2POS (ORCPT ); Mon, 29 Jun 2015 11:14:18 -0400 Date: Mon, 29 Jun 2015 17:14:02 +0200 From: Peter Zijlstra To: Tejun Heo Cc: Nicholas Mc Guire , oleg@redhat.com, paulmck@linux.vnet.ibm.com, mingo@redhat.com, linux-kernel@vger.kernel.org, dave@stgolabs.net, riel@redhat.com, viro@ZenIV.linux.org.uk, torvalds@linux-foundation.org Subject: Re: [RFC][PATCH 05/13] percpu-rwsem: Optimize readers and reduce global impact Message-ID: <20150629151402.GJ19282@twins.programming.kicks-ass.net> References: <20150622121623.291363374@infradead.org> <20150622122256.064223889@infradead.org> <20150623072811.GB20073@opentech.at> <20150625190800.GW19282@twins.programming.kicks-ass.net> <20150625191701.GA5013@mtj.duckdns.org> <20150629093219.GD3644@twins.programming.kicks-ass.net> <20150629151220.GL15805@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150629151220.GL15805@mtj.duckdns.org> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 855 Lines: 26 On Mon, Jun 29, 2015 at 11:12:20AM -0400, Tejun Heo wrote: > Hello, Peter. > > On Mon, Jun 29, 2015 at 11:32:19AM +0200, Peter Zijlstra wrote: > > Agreed, luckily we already have the infrastructure for this, something > > like so? > > > > --- a/include/linux/percpu-defs.h > > +++ b/include/linux/percpu-defs.h > > @@ -287,6 +287,16 @@ do { \ > > preempt_enable(); \ > > } while (0) > > > > +#define per_cpu_sum(var) \ > > +({ \ > > + typeof(var) __sum = 0; \ > > + int cpu; \ > > Why not __cpu? I've no idea, __cpu is indeed more consistent, consider it changed. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/