Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp350637pxu; Tue, 1 Dec 2020 12:54:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyKJXodvvWneuboem7NAmXzookjwaKcRVeYnBvt2Q2/tmkzj6uGtlhQQDhK7w6IVNxfzQOW X-Received: by 2002:a50:b941:: with SMTP id m59mr5008330ede.371.1606856040615; Tue, 01 Dec 2020 12:54:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606856040; cv=none; d=google.com; s=arc-20160816; b=JQigKaiK8mmsZbzXZ8R58W3iB4xvUiWZ4yeuxlzxIceO1x6J1JsxZRqDfr5IZTHxbA MzqZBJgPKfh+iKwhJ616DBFAcSU6gheivIP/asdMyq5uwv4vQD7YBZ8CLx1n9+0ErQ2A 3MWkEOFMZqEBhj3QJ3EO8ekY8TtNcvzvVNn7ziVe2exkFTpigVQvwE71tJhdFM0yYfO2 qcYdvqEupgU0Kc6HlWcNbpcNIrV1IpZDrqNMqTzYkOqv8i1r7nyTtuagRcXTSNCEiD3i NT9Cx8YSPDeFspcwRi1KvPI3FITtoUAjNohUCVwtn8P/t+dh1v1dpr4chYxjoDMZLXh3 Zkag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dyBlRLPwKTQ0rIK/KfQyG6Ob+vSn1EgfGLIeGxV2yms=; b=ut1zh3w7bF1H1qzsvFs2RUdD6x8hE6Wv70wVprblG829XOmshGKXCOhrjWow5q6ZBp IvEMJquihY7wVgFqIl87GSG7lC75DNweBW+AKNcDw0tgW436XSG9Zt2woRvjhUIylGC9 5oF67OqwmNhIMxiJw0V0wtHyF8W9TBZdkzNJi2ApOdBAPJXorg2neS7ih/thLgQn0li6 ZlWDaN9gJhVbXuDhwOmmJbdkzVTTL1MaFMsU4dbIW/GtprI9VszUO/mLqwd653Kr8DYw lRD6NUxYVl62ofBC3z9MgEmQoe3hViXWdwiDCcHGqsEqUc6XGasYlYjz87nm5S7K82F2 a6cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="JJv/jUDU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o21si635891ejc.176.2020.12.01.12.53.36; Tue, 01 Dec 2020 12:54:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="JJv/jUDU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387749AbgLAUto (ORCPT + 99 others); Tue, 1 Dec 2020 15:49:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbgLAUto (ORCPT ); Tue, 1 Dec 2020 15:49:44 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D35A7C0613D6 for ; Tue, 1 Dec 2020 12:49:03 -0800 (PST) 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.