From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73AB5C43444 for ; Wed, 9 Jan 2019 21:01:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 407BC206BB for ; Wed, 9 Jan 2019 21:01:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727462AbfAIVBr (ORCPT ); Wed, 9 Jan 2019 16:01:47 -0500 Received: from ipmail06.adl6.internode.on.net ([150.101.137.145]:4806 "EHLO ipmail06.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726581AbfAIVBr (ORCPT ); Wed, 9 Jan 2019 16:01:47 -0500 Received: from ppp59-167-129-252.static.internode.on.net (HELO dastard) ([59.167.129.252]) by ipmail06.adl6.internode.on.net with ESMTP; 10 Jan 2019 07:31:17 +1030 Received: from dave by dastard with local (Exim 4.80) (envelope-from ) id 1ghKyO-0001b0-1h; Thu, 10 Jan 2019 08:01:12 +1100 Date: Thu, 10 Jan 2019 08:01:12 +1100 From: Dave Chinner To: Qian Cai Cc: darrick.wong@oracle.com, dchinner@redhat.com, peterz@infradead.org, bfoster@redhat.com, hch@lst.de, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] xfs: silence lockdep false positives when freezing Message-ID: <20190109210111.GZ4205@dastard> References: <20190106225639.GU4205@dastard> <20190109205329.2486-1-cai@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190109205329.2486-1-cai@lca.pw> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 09, 2019 at 03:53:29PM -0500, Qian Cai wrote: > Easy to reproduce: > > 1. run LTP oom02 workload to let kswapd acquire this locking order: > fs_reclaim -> sb_internal. > > # grep -i fs_reclaim -C 3 /proc/lockdep_chains | grep -C 5 sb_internal > [00000000826b9172] &type->s_umount_key#27 > [000000005fa8b2ac] sb_pagefaults > [0000000033f1247e] sb_internal > [000000009e9a9664] fs_reclaim > > 2. freeze XFS. > # fsfreeze -f /home > > Dave mentioned that this is due to a lockdep limitation - "IOWs, this is > a false positive, caused by the fact that xfs_trans_alloc() is called > from both above and below memory reclaim as well as within /every level/ > of freeze processing. Lockdep is unable to describe the staged flush > logic in the freeze process that prevents deadlocks from occurring, and > hence we will pretty much always see false positives in the freeze > path....". Hence, just temporarily disable lockdep in that path. NACK. Turning off lockdep is not a solution, it just prevents lockdep from finding and reporting real issues. Cheers, Dave. -- Dave Chinner david@fromorbit.com