From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755575AbbGUU0V (ORCPT ); Tue, 21 Jul 2015 16:26:21 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59415 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754706AbbGUU0R (ORCPT ); Tue, 21 Jul 2015 16:26:17 -0400 Date: Mon, 20 Jul 2015 10:26:56 +0200 From: Jan Kara To: Dave Chinner Cc: Oleg Nesterov , Jan Kara , 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: <20150720082656.GC3131@quack.suse.cz> References: <55A57C50.1080406@linux.intel.com> <20150714212249.GA18441@redhat.com> <55A581F9.3090507@linux.intel.com> <20150715064705.GA22609@quack.suse.cz> <20150715181920.GA1797@redhat.com> <20150716072654.GE22847@quack.suse.cz> <20150716173256.GA17753@redhat.com> <20150717012742.GV3902@dastard> <20150717173117.GB30443@redhat.com> <20150717224015.GR7943@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150717224015.GR7943@dastard> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 18-07-15 08:40:15, Dave Chinner wrote: > On Fri, Jul 17, 2015 at 07:31:17PM +0200, Oleg Nesterov wrote: > > On 07/17, Dave Chinner wrote: > > > > > > On Thu, Jul 16, 2015 at 07:32:56PM +0200, Oleg Nesterov wrote: > > > > > > > > #ifdef CONFIG_LOCKDEP > > > > /* > > > > * We want lockdep to tell us about possible deadlocks with freezing but > > > > * it's it bit tricky to properly instrument it. Getting a freeze protection > > > > * works as getting a read lock but there are subtle problems. XFS for example > > > > * gets freeze protection on internal level twice in some cases, which is OK > > > > > > Sorry, I've missed something here - where is XFS nesting > > > sb_start_intwrite() calls? > > > > Heh ;) I too tried to understand thi but failed. I was not surprized, > > I know nothing about fs/. > > > > Dave, I didn't write this comment. Please look at acquire_freeze_lock(). > > If we can remove this logic - great! but this needs a separate change. > > Oh, I think I know what it was - when we duplicate a transaction for > a rolling commit, we do it before committing the current transaction > is committed. I *think* that used to take a second freeze reference, > which only existed until the first transaction was committed. We do > things a bit differently now - we hold a state flag on the > transaction to indicate it needs to release the freeze reference > when it is freed and we pass it to the new transaction so that the > first transaction commit doesn't release it. > > So, yes, it may well be a stale comment now. Yeah, as far as I remember this was the reason why I added the comment. So Oleg, feel free to remove the special code and run xfstests with XFS and lockdep enabled to verify there are really no issues. Thanks! Honza -- Jan Kara SUSE Labs, CR