From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751897AbdHVVTg (ORCPT ); Tue, 22 Aug 2017 17:19:36 -0400 Received: from ipmail01.adl2.internode.on.net ([150.101.137.133]:31982 "EHLO ipmail01.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751290AbdHVVTf (ORCPT ); Tue, 22 Aug 2017 17:19:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CCAQDmnpxZ//yBpztUCBkBAQEBAQEBAQEBAQcBAQEBAYVTjwiPXwEBAQEBAQaBKo0WhCmGcoVBAgIBAQKEcxUBAgEBAQEBAQFrKIUYAQEBAQIBOhwjBQsIAxgJJQ8FJQMhE4okBQevaYtjAQsBJSCDCoMHhVGEToYZBaBVlDaSbUiVYTUigQoyIQgcFYVgHBmBYC42iwEBAQE Date: Wed, 23 Aug 2017 07:19:31 +1000 From: Dave Chinner To: Peter Zijlstra Cc: Byungchul Park , mingo@kernel.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, Arnaldo Carvalho de Melo , Tejun Heo , Boqun Feng Subject: Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all part of PROVE_LOCKING Message-ID: <20170822211931.GU10621@dastard> References: <1502960261-16206-1-git-send-email-byungchul.park@lge.com> <20170821154600.asyzqs2zg6w6o4pg@hirez.programming.kicks-ass.net> <20170822054603.GT10621@dastard> <20170822090603.vufl5ncoequ5ag6x@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170822090603.vufl5ncoequ5ag6x@hirez.programming.kicks-ass.net> 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 Tue, Aug 22, 2017 at 11:06:03AM +0200, Peter Zijlstra wrote: > On Tue, Aug 22, 2017 at 03:46:03PM +1000, Dave Chinner wrote: > > Even if I ignore the fact that buffer completions are run on > > different workqueues, there seems to be a bigger problem with this > > sort of completion checking. > > > > That is, the trace looks plausible because we are definitely hold an > > inode locked deep inside a truncate operation where the completion > > if flagged. Indeed, some transactions that would flag like this > > could be holding up to 5 inodes locked and have tens of other > > metadata objects locked. There are potentially tens (maybe even > > hundreds) of different paths into this IO wait point, and all have > > different combinations of objects locked when it triggers. So > > there's massive scope for potential deadlocks.... > > > > .... and so we must have some way of avoiding this whole class of > > problems that lockdep is unaware of. > > So I did the below little hack, which basically wipes the entire lock > history when we start a work and thereby disregards/looses the > dependency on the work 'lock'. Ok, so now it treats workqueue worker threads like any other process? > It makes my test box able to boot and build a kernel on XFS, so while I > see what you're saying (I think), it doesn't appear to instantly show. > > Should I run xfstests or something to further verify things are OK? Does > that need a scratch partition (I keep forgetting how to run that stuff > :/). A couple of 4-8GB ramdisks/fake pmem regions is all you need. Put this in the configs/.config file, modifying the devices to suit: [xfs] FSTYP=xfs TEST_DIR=/mnt/test TEST_DEV=/dev/pmem0 SCRATCH_MNT=/mnt/scratch SCRATCH_DEV=/dev/pmem1 and run "./check -s xfs -g auto" from the root of the xfstests source tree. Cheers, Dave. -- Dave Chinner david@fromorbit.com