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.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 06803C64E8A for ; Wed, 2 Dec 2020 02:28:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 50CC0204EA for ; Wed, 2 Dec 2020 02:28:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50CC0204EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5050B6B005C; Tue, 1 Dec 2020 21:28:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 496B76B005D; Tue, 1 Dec 2020 21:28:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 37D5A8D0001; Tue, 1 Dec 2020 21:28:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0040.hostedemail.com [216.40.44.40]) by kanga.kvack.org (Postfix) with ESMTP id 1F3E96B005C for ; Tue, 1 Dec 2020 21:28:52 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D5BF3824999B for ; Wed, 2 Dec 2020 02:28:51 +0000 (UTC) X-FDA: 77546759262.19.cave03_4c067f4273af Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id BBA7A1AD31E for ; Wed, 2 Dec 2020 02:28:51 +0000 (UTC) X-HE-Tag: cave03_4c067f4273af X-Filterd-Recvd-Size: 4595 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Wed, 2 Dec 2020 02:28:50 +0000 (UTC) Received: by mail-ed1-f44.google.com with SMTP id y4so712444edy.5 for ; Tue, 01 Dec 2020 18:28:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jM9A+3KaaiPpvWPDXTsVYgKekaxWNn0Vy+5ecqlGLPk=; b=UcWU6mPHePQD7oxZyJ3QI8EBVRLqdLckOHec4/9GUNtNJH3fJzfnc9+ztdoEZjCkFw pYdz6h215kR81M6/JrHPGGE5mAfzQQMgD1i9mIi8EJGhb/u1CYqH6160qHQ3b5goL1aM vGHkaj29vjmNYeeFbHudC+HBE9Y4xixArtOHYpdFMqBwTEWbj33jt/2nmtRqLgDNYV2j nk9h/P1PBU8VbP7vQVb/h77TvTier9YybxSyjIZYgDPtcCIRqAEwiwv0JSdcyRBwvwtp Jw6Pf7YqjvpAz7aDt6cfCQtF6Qt89Z0FDXZ9FlhlIdwAc8bOCefJLS/+H9ccZuhUBswZ pWHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jM9A+3KaaiPpvWPDXTsVYgKekaxWNn0Vy+5ecqlGLPk=; b=kEcNsKiDLS+EFN5z0S6K3K9FUpNtgwYuZRw4OeaDyAA9dOyG0HT3pR/QvTMRApzwoz xoMM8bIlMIgO5LQ7wqa9Xgetdw9tY7tZhbI+JNpUtOtfvJLCccblPonFesB6u84HFssE tSAG78bTiFwkeGVY7kNDVNOiEdtDH5uvDDNg75eX9cSdQxSnpHMW2jH2H2KpKYBe8d4I fqnGAUQub/P+eiMCml18OVFvZQd20lf5DWYl3I58H19hyswsF8sHwkV8/ZTX/GytNaJQ pWNWyLMaWC5Q5E7MlQ+VlNj2XqGqtjgHePBN4wIqTePzy5mueyyqegSdajSRztojIhhn 5Bug== X-Gm-Message-State: AOAM530Byclqkk0Ebo00xve7ESqo2TA4I8mAot0wBpzWa4+VuzBrTnNJ H+SeMghE5jQEdwhSdA+1FaOZ0pZK0TQGFTd0xyNJXg== X-Google-Smtp-Source: ABdhPJxxdgVGhyjxYPVa1iHrBXTrpKmswqz6i0GnJFbV69X4wbpncFo9Iyek+7pIGpd5QudB/5mxTjUf/+DRUG+1QUI= X-Received: by 2002:a50:e00f:: with SMTP id e15mr584892edl.210.1606876129090; Tue, 01 Dec 2020 18:28:49 -0800 (PST) MIME-Version: 1.0 References: <20201201022412.GG4327@casper.infradead.org> <20201201204900.GC11935@casper.infradead.org> In-Reply-To: <20201201204900.GC11935@casper.infradead.org> From: Dan Williams Date: Tue, 1 Dec 2020 18:28:45 -0800 Message-ID: Subject: Re: mapcount corruption regression To: Matthew Wilcox Cc: "Shutemov, Kirill" , Linux Kernel Mailing List , Linux MM , linux-nvdimm , Vlastimil Babka , Yi Zhang Content-Type: text/plain; charset="UTF-8" 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 1, 2020 at 12:49 PM Matthew Wilcox wrote: > > 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. As a shot in the dark I reverted: b2b29d6d0119 mm: account PMD tables like PTE tables ...and the test passed. Yi, do you see the same?