From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753129AbbGOSVH (ORCPT ); Wed, 15 Jul 2015 14:21:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38711 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751592AbbGOSVG (ORCPT ); Wed, 15 Jul 2015 14:21:06 -0400 Date: Wed, 15 Jul 2015 20:19:20 +0200 From: Oleg Nesterov To: Jan Kara Cc: Dave Hansen , Al Viro , Linus Torvalds , Paul McKenney , Peter Zijlstra , Daniel Wagner , Davidlohr Bueso , Ingo Molnar , Tejun Heo , linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 0/4] change sb_writers to use percpu_rw_semaphore Message-ID: <20150715181920.GA1797@redhat.com> References: <20150713212536.GA13855@redhat.com> <20150714104810.GB24369@quack.suse.cz> <20150714133731.GA24837@redhat.com> <55A57C50.1080406@linux.intel.com> <20150714212249.GA18441@redhat.com> <55A581F9.3090507@linux.intel.com> <20150715064705.GA22609@quack.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150715064705.GA22609@quack.suse.cz> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/15, Jan Kara wrote: > > On Tue 14-07-15 14:41:13, Dave Hansen wrote: > > > > I looked at it again. I tested with this patch in addition to the ones > > modifying __sb_start/end_write(): > > > > https://lkml.org/lkml/2015/6/24/682 > > > > That is where the performance delta came from. Your patches (plus the > > fsnotify optimization) perform very similarly to my approach. > > > > Yours remove so much code that I think they are the preferable approach. > > > > They don't compile with lockdep on, btw. :) > > Great, thanks for hashing it out. Yes, thanks Dave! > So I'm also in favor of Oleg's approach > as well. We just have to wait until he fixes the outstanding issues with > his code. Yes. I'll try to make the working version, hopefully this week. But, > Dave, just send your fsnotify patch separately to AKPM - he > usually merges fsnotify stuff. Perhaps it makes to merge other 2 patches from Dave first? (those which change __sb_start/end_write to rely on RCU). Afaics these changes are straightforward and correct. Although I'd suggest to use preempt_disable() and synchronize_sched() instead. I will be happy to (try to) make this conversion on top of his changes. Because I do not want to delay the performance improvements and I do not know when exactly I'll send the next version: I need to finish the previous discussion about rcu_sync first. And the necessary changes in fs/super.c depend on whether percpu_rw_semaphore will have rcu_sync or not (not too much, only destroy_super() depends, but still). And of course, I am worried that I missed something and percpu_rw_semaphore can't work for some reason. The code in fs/super.c looks simple, but it seems that filesystems do the "strange" things with lockdep at least. Oleg.