From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756079AbbGQXrs (ORCPT ); Fri, 17 Jul 2015 19:47:48 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:35678 "EHLO e39.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755307AbbGQXrp (ORCPT ); Fri, 17 Jul 2015 19:47:45 -0400 X-Helo: d03dlp03.boulder.ibm.com X-MailFrom: paulmck@linux.vnet.ibm.com X-RcptTo: linux-kernel@vger.kernel.org Date: Fri, 17 Jul 2015 16:47:39 -0700 From: "Paul E. McKenney" To: Oleg Nesterov Cc: Linus Torvalds , Peter Zijlstra , Daniel Wagner , Davidlohr Bueso , Ingo Molnar , Tejun Heo , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/7] Add rcu_sync infrastructure to avoid _expedited() in percpu-rwsem Message-ID: <20150717234739.GN3717@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20150711233535.GA829@redhat.com> <20150715182713.GL3717@linux.vnet.ibm.com> <20150715193601.GA4386@redhat.com> <20150715215927.GO3717@linux.vnet.ibm.com> <20150717232930.GA16247@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150717232930.GA16247@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15071723-0033-0000-0000-000005347E85 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 18, 2015 at 01:29:30AM +0200, Oleg Nesterov wrote: > On 07/15, Paul E. McKenney wrote: > > > > On Wed, Jul 15, 2015 at 09:36:01PM +0200, Oleg Nesterov wrote: > > > > > > Do you mean you need another user except percpu_rw_semaphore? I do > > > not see any right now... > > > > Not asking for more than one use, but it does need a use. I believe > > that percpu_rw_semaphore suffices. > > > > > Let me remind about sb_writers again. It actually has 3 rw_sem's > > > and I am trying to turn then into percpu_rw_semaphore's. > > > > > > In this case freeze_super() will need 6 synchronize_sched_expedited(). > > > This just looks ugly. But if we have rcu_sync primitives, all 3 sem's > > > in struct super_block can share the same "struct rcu_sync", and > > > freeze_super() will need only once synchronize_sched(). > > > > Makes sense. > > Great, thanks. And iiuc Linus doesn't object to this particular change. > Plus I see the "Make checkpatch.pl warn on expedited RCU grace periods" > patch ;) Note that it is a warning rather than an error. ;-) > So can I assume you will take these changes? > > I do not need them right now, just I need to know what should I do in > destroy_super() and (much more importantly) what should I say in the > changelogs if I try to convert sb_writers to use percpu_rw_semaphore. Yes, given a real use case, which you do appear to have, I will take these changes. Thanx, Paul