From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753433AbbGRDTY (ORCPT ); Fri, 17 Jul 2015 23:19:24 -0400 Received: from ipmail05.adl6.internode.on.net ([150.101.137.143]:58028 "EHLO ipmail05.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752969AbbGRDTX (ORCPT ); Fri, 17 Jul 2015 23:19:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CWCQALxalVPKj/LHlbJ4JsgT2GUaIuAQEBAQEBBppDBAICgUVNAQEBAQEBBwEBAQFBP4QkAQEEOhwjEAgDGAklDwUlAwcaE4gtz2ABAQgCIBmGBYUuhQYHhCsFlE+MH4FEhBmDEIU1imWBCYMrLDGCSwEBAQ Date: Sat, 18 Jul 2015 08:40:15 +1000 From: Dave Chinner To: Oleg Nesterov Cc: 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: <20150717224015.GR7943@dastard> References: <20150714133731.GA24837@redhat.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150717173117.GB30443@redhat.com> 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 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. Cheers, Dave. -- Dave Chinner david@fromorbit.com