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.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 1AA86C64E7B for ; Tue, 1 Dec 2020 20:49:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4EB9820679 for ; Tue, 1 Dec 2020 20:49:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="JJv/jUDU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4EB9820679 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 8D7D06B0036; Tue, 1 Dec 2020 15:49:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8880B8D0002; Tue, 1 Dec 2020 15:49:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 750468D0001; Tue, 1 Dec 2020 15:49:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id 602C66B0036 for ; Tue, 1 Dec 2020 15:49:08 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 241E9181AEF1E for ; Tue, 1 Dec 2020 20:49:08 +0000 (UTC) X-FDA: 77545903176.24.way99_1017a64273ad Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id F2FA71A4A7 for ; Tue, 1 Dec 2020 20:49:07 +0000 (UTC) X-HE-Tag: way99_1017a64273ad X-Filterd-Recvd-Size: 3212 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Dec 2020 20:49:07 +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=dyBlRLPwKTQ0rIK/KfQyG6Ob+vSn1EgfGLIeGxV2yms=; b=JJv/jUDUAQHzh744cKMjYelWef QTIfn+k/elN1QSMiCosaURKxQ2fWjh8q5u2jiv6QfFKVvUpCoopn/ASQfT2etb0mpcaFppKzMYJXm Go2y9Rwev3yIt6lHEo1tzZH2Wx2Q6u9PRMkr63pL1mC/IMEd1XbOi4IkeJ+0HK/hwir/XDFgjgrEN cdhpbGfdToA0xP9TZ7gkSGag0nCbiIVH+0pdZciOchpvAvCRGfkDtBJxnzM40g2ajgf/GCFJ2W11C YBwt2vpgu5H8EUX4Boxoe/hCjSfDn7VgdY9T2yM55nPU61QYzgqXbURWXBFMxxDDvUGPOpG8UlTrn 97JljK1A==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkCa4-0002i8-S3; Tue, 01 Dec 2020 20:49:00 +0000 Date: Tue, 1 Dec 2020 20:49:00 +0000 From: Matthew Wilcox To: Dan Williams Cc: "Shutemov, Kirill" , Linux Kernel Mailing List , Linux MM , linux-nvdimm , Vlastimil Babka Subject: Re: mapcount corruption regression Message-ID: <20201201204900.GC11935@casper.infradead.org> References: <20201201022412.GG4327@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, Dec 01, 2020 at 12:42:39PM -0800, Dan Williams wrote: > On Mon, Nov 30, 2020 at 6:24 PM Matthew Wilcox wrote: > > > > On Mon, Nov 30, 2020 at 05:20:25PM -0800, Dan Williams wrote: > > > Kirill, Willy, compound page experts, > > > > > > I am seeking some debug ideas about the following splat: > > > > > > BUG: Bad page state in process lt-pmem-ns pfn:121a12 > > > page:0000000051ef73f7 refcount:0 mapcount:-1024 > > > mapping:0000000000000000 index:0x0 pfn:0x121a12 > > > > Mapcount of -1024 is the signature of: > > > > #define PG_guard 0x00000400 > > Oh, thanks for that. I overlooked how mapcount is overloaded. Although > in v5.10-rc4 that value is: > > #define PG_table 0x00000400 Ah, I was looking at -next, where Roman renumbered it. I know UML had a problem where it was not clearing PG_table, but you seem to be running on bare metal. SuperH did too, but again, you're not using SuperH. > > > > (the bits are inverted, so this turns into 0xfffffbff which is reported > > as -1024) > > > > I assume you have debug_pagealloc enabled? > > Added it, but no extra spew. I'll dig a bit more on how PG_table is > not being cleared in this case. I only asked about debug_pagealloc because that sets PG_guard. Since the problem is actually PG_table, it's not relevant.