From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751857AbcGOSB3 (ORCPT ); Fri, 15 Jul 2016 14:01:29 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46343 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751241AbcGOSB0 (ORCPT ); Fri, 15 Jul 2016 14:01:26 -0400 X-IBM-Helo: d01dlp03.pok.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com Date: Fri, 15 Jul 2016 11:01:40 -0700 From: "Paul E. McKenney" To: Oleg Nesterov 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 Reply-To: paulmck@linux.vnet.ibm.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> <20160715164938.GA4294@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160715164938.GA4294@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16071518-0056-0000-0000-000000CBA841 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16071518-0057-0000-0000-000004E5BE05 Message-Id: <20160715180140.GM7094@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-15_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1607150189 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 15, 2016 at 06:49:39PM +0200, Oleg Nesterov wrote: > 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). OK, then move the checks out into the callers that would have used __rcu_sync_enter(). ;-) Thanx, Paul