From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753998AbbFXR36 (ORCPT ); Wed, 24 Jun 2015 13:29:58 -0400 Received: from e34.co.us.ibm.com ([32.97.110.152]:37553 "EHLO e34.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753199AbbFXR3u (ORCPT ); Wed, 24 Jun 2015 13:29:50 -0400 X-Helo: d03dlp01.boulder.ibm.com X-MailFrom: paulmck@linux.vnet.ibm.com X-RcptTo: linux-kernel@vger.kernel.org Date: Wed, 24 Jun 2015 10:29:21 -0700 From: "Paul E. McKenney" To: Dave Hansen Cc: Peter Zijlstra , Andi Kleen , dave.hansen@linux.intel.com, akpm@linux-foundation.org, jack@suse.cz, viro@zeniv.linux.org.uk, eparis@redhat.com, john@johnmccutchan.com, rlove@rlove.org, tim.c.chen@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH] fs: optimize inotify/fsnotify code for unwatched files Message-ID: <20150624172908.GH3717@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20150619233306.GT25760@tassilo.jf.intel.com> <5584B62F.5080506@sr71.net> <20150620022135.GF3913@linux.vnet.ibm.com> <5585AAA0.1030305@sr71.net> <20150621013058.GH3913@linux.vnet.ibm.com> <20150622132821.GB12596@twins.programming.kicks-ass.net> <20150622151121.GK3913@linux.vnet.ibm.com> <5588590A.7080001@sr71.net> <20150623002614.GD3892@linux.vnet.ibm.com> <558ADFEA.7020905@sr71.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <558ADFEA.7020905@sr71.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15062417-0017-0000-0000-00000BEA5187 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2015 at 09:50:50AM -0700, Dave Hansen wrote: > On 06/22/2015 05:26 PM, Paul E. McKenney wrote: > > OK, here is an experimental patch that provides a fast-readers variant > > of RCU, forward-ported from v3.3. Because we didn't have call_srcu() > > and srcu_barrier() back then, it is not a drop-in replacement for SRCU, > > so you need to adapt the code to the API, which means putting an "fr" > > in front of the "srcu" in the API members. > > > > Understood on the overhead of the memory-barrier instruction showing > > up consistently. My point was instead that getting rid of this > > memory-barrier instruction does not come for free, as it greatly > > increases the latency of synchronize_frsrcu(). In a real workload, > > it is entirely possible that the savings from eliminating the memory > > barrier are overwhelmed by the increased grace-period latency. > > > > Anyway, the patch is below. Very lightly tested. > > This does give a very similar performance boost as the other > optimization I posted. I measured this patch to boost the writes/second > by 11.0% while my previous optimization did 10.8%. > > I don't think this workload will see any of the overhead of the > synchronize_frsrcu(), though, but this helps confirm the source of the > overhead. Thank you for testing it! I agree that your patch is much simpler than adding another flavor of RCU, so I prefer your patch, but the confirmation is nevertheless valuable. Thanx, Paul