From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753174AbbGQB16 (ORCPT ); Thu, 16 Jul 2015 21:27:58 -0400 Received: from ipmail07.adl2.internode.on.net ([150.101.137.131]:40994 "EHLO ipmail07.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbbGQB15 (ORCPT ); Thu, 16 Jul 2015 21:27:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2C8BgAEWahV/+QtLHlagxOBPah4AQEGmjoEAgKBSE0BAQEBAQGBC4QkAQEEOhwjEAgDGAklDwUlAyETiC3QGAEBCAIgGYYFhS6FBgeEKwWUSYwXgUSHKYUzimImY4MrLDGCSwEBAQ Date: Fri, 17 Jul 2015 11:27:42 +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: <20150717012742.GV3902@dastard> 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> <20150715181920.GA1797@redhat.com> <20150716072654.GE22847@quack.suse.cz> <20150716173256.GA17753@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150716173256.GA17753@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 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? XFS only has a call to sb_start_intwrite() in xfs_trans_alloc() and an open coded equivalent in xfs_iomap_write_unwritten(). However, we cannot create nested transaction contexts as doing so is *guaranteed to deadlock the journal*. (e.g. why we use PF_FSTRANS to trigger GFP_NOFS allocation as it prevents direct memory reclaim from causing nested transactions.) Hence if we taking multiple FREEZE_FS level references at a time then there is a bug that needs fixing.... Cheers, Dave. -- Dave Chinner david@fromorbit.com