From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751775AbcGOQtX (ORCPT ); Fri, 15 Jul 2016 12:49:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39794 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350AbcGOQtV (ORCPT ); Fri, 15 Jul 2016 12:49:21 -0400 Date: Fri, 15 Jul 2016 18:49:39 +0200 From: Oleg Nesterov To: "Paul E. McKenney" Cc: Peter Zijlstra , mingo@kernel.org, linux-kernel@vger.kernel.org, tj@kernel.org, john.stultz@linaro.org, dimitrysh@google.com, romlem@google.com, ccross@google.com, tkjos@google.com Subject: Re: [PATCH 2/2] locking/percpu-rwsem: Introduce bias knob Message-ID: <20160715164938.GA4294@redhat.com> References: <20160714182545.786693675@infradead.org> <20160714183022.336211504@infradead.org> <20160714184351.GA18388@redhat.com> <20160714192018.GM30154@twins.programming.kicks-ass.net> <20160715132709.GA27644@redhat.com> <20160715133928.GH7094@linux.vnet.ibm.com> <20160715134523.GB28589@redhat.com> <20160715153840.GI7094@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160715153840.GI7094@linux.vnet.ibm.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 15 Jul 2016 16:49:20 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/15, Paul E. McKenney wrote: > On Fri, Jul 15, 2016 at 03:45:24PM +0200, Oleg Nesterov wrote: > > On 07/15, Paul E. McKenney wrote: > > > > > > On Fri, Jul 15, 2016 at 03:27:09PM +0200, Oleg Nesterov wrote: > > > > > > > > Heh ;) I too think it should be renamed. I'd suggest > > > > > > > > __rcu_sync_enter(rss); > > > > > > > > although I do not really mind and agree with any name. > > > > > > Hmmm... Why not just move the checks out into the caller? That > > > would make the intent much more clear. > > > > Hmm. which caller? > > The ones associated with a percpu_rwsem_bias of PERCPU_RWSEM_READER. Ah. But if we add __rcu_sync_enter() instead of bias/PERCPU_RWSEM_READER. IOW, please ignore 2/2 which adds PERCPU_RWSEM_READER, the new version just adds rcu_sync_sabotage() which should be renamed (and use GP_PASSED). Oleg.