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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 CDC7EC636C9 for ; Sat, 17 Jul 2021 17:41:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 37D4161040 for ; Sat, 17 Jul 2021 17:41:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37D4161040 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 602D48D00F4; Sat, 17 Jul 2021 13:41:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B2A48D00EC; Sat, 17 Jul 2021 13:41:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 453FC8D00F4; Sat, 17 Jul 2021 13:41:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0187.hostedemail.com [216.40.44.187]) by kanga.kvack.org (Postfix) with ESMTP id 1DBDA8D00EC for ; Sat, 17 Jul 2021 13:41:00 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CFD008249980 for ; Sat, 17 Jul 2021 17:40:58 +0000 (UTC) X-FDA: 78372795396.01.C445902 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf10.hostedemail.com (Postfix) with ESMTP id 05EF560019B3 for ; Sat, 17 Jul 2021 17:40:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=DcoB5AK+oNf7jtGcvYpmjtox9/yKj0Ghaxmo8XeiH4Y=; b=OJ1rg0Y44Tb0p/GihnVaJ0OVkn mCUZ80J3EEZtlQ1xQetEvzO4QEtf6FDIqHHOOCZcCje6/jKMtCol1vYqdqJaZe6fN//vXjq7tfkwp 0UGtXOFhT9Z91Am1UWzrefxqHbBPKRlNE4+Ik55+U75CAwUnuiTAcelH9zngkspnHO1fVq4S2DKEy /SY3bdEweoM2/jwuIpGReH9FOMbx5Ieowd4LCKE2n1Ak0qt9JuGqbjDK3S4wMj0et/q/gQppyO10O Y92IDzx/nA+5Oej4ty3cogPnuvvn4gLHfQXkWuHs/1A9rm10UoMtr1m/NQokT6DXDb9n9WmL2ulby QBbcKJ2w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m4oIP-005RiN-1t; Sat, 17 Jul 2021 17:40:22 +0000 Date: Sat, 17 Jul 2021 18:40:13 +0100 From: Matthew Wilcox To: "Darrick J. Wong" Cc: Roman Gushchin , Murphy Zhou , Linux-Fsdevel , Linux MM Subject: Re: [fsdax xfs] Regression panic at inode_switch_wbs_work_fn Message-ID: References: <20210717171713.GB22357@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210717171713.GB22357@magnolia> Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=OJ1rg0Y4; spf=none (imf10.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam05 X-Stat-Signature: y8mfo8k79a18fefb6ao5dk7tc8anomw1 X-Rspamd-Queue-Id: 05EF560019B3 X-HE-Tag: 1626543657-199660 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Jul 17, 2021 at 10:17:13AM -0700, Darrick J. Wong wrote: > I experience the same problem that Murphy does, and I tracked it down > to this chunk of inode_do_switch_wbs: > > /* > * Count and transfer stats. Note that PAGECACHE_TAG_DIRTY points > * to possibly dirty pages while PAGECACHE_TAG_WRITEBACK points to > * pages actually under writeback. > */ > xas_for_each_marked(&xas, page, ULONG_MAX, PAGECACHE_TAG_DIRTY) { > here >>>>>>>>>> if (PageDirty(page)) { > dec_wb_stat(old_wb, WB_RECLAIMABLE); > inc_wb_stat(new_wb, WB_RECLAIMABLE); > } > } > > I suspect that "page" is really a pfn to a pmem mapping and not a real > struct page. I think you're right. Running scripts/decodecode on the original report, that's: 0: 48 8b 50 08 mov 0x8(%rax),%rdx RAX: 0000000005b0f661 so rax is not a struct page, it's a PFN (/DAX) entry. We shouldn't even be calling inode_do_switch_wbs() for DAX inodes because we don't do writeback for DAX inodes (at least as far as the kernel's writeback infrastructure is concerned; obviously the CPU does writeback from its caches to PMEM). Maybe some check at a higher level would be appropriate? I don't know much about this part of the kernel.