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=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 08D4DC433E1 for ; Fri, 7 Aug 2020 06:19:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A81CF2177B for ; Fri, 7 Aug 2020 06:19:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Se3yqsVe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A81CF2177B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3D38F8D0033; Fri, 7 Aug 2020 02:19:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AB5F8D0026; Fri, 7 Aug 2020 02:19:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C28E8D0033; Fri, 7 Aug 2020 02:19:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id 10F098D0026 for ; Fri, 7 Aug 2020 02:19:57 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CACF582499B9 for ; Fri, 7 Aug 2020 06:19:56 +0000 (UTC) X-FDA: 77122771992.08.horse23_470d26026fbe Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 83A871819E785 for ; Fri, 7 Aug 2020 06:19:50 +0000 (UTC) X-HE-Tag: horse23_470d26026fbe X-Filterd-Recvd-Size: 3331 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Fri, 7 Aug 2020 06:19:50 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0D9EB221E5; Fri, 7 Aug 2020 06:19:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596781189; bh=ItaENuLzbga2ZYUsDhfJatfHSMpzLwPFCFJTP1wRIYs=; h=Date:From:To:Subject:In-Reply-To:From; b=Se3yqsVe+qRWcqEugDyTGzYFzMlGA79IK0HrXfxZdk8eTN03tpned3oCWLfKz238F fsdYKWuydeAa0QqNRbHqyVKLtd+/OLHGvh8GVVzdkLV0yL+S9PUm6FyfU0atwMvaON LF+pe8fgWPsz+IcuhSlNp3LPahlAjCzanL/WtPfo= Date: Thu, 06 Aug 2020 23:19:48 -0700 From: Andrew Morton To: akpm@linux-foundation.org, jhubbard@nvidia.com, kirill@shutemov.name, linux-mm@kvack.org, mm-commits@vger.kernel.org, rppt@linux.ibm.com, torvalds@linux-foundation.org, vbabka@suse.cz, william.kucharski@oracle.com, willy@infradead.org Subject: [patch 049/163] mm/debug: print hashed address of struct page Message-ID: <20200807061948.8LG6yOu9l%akpm@linux-foundation.org> In-Reply-To: <20200806231643.a2711a608dd0f18bff2caf2b@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Queue-Id: 83A871819E785 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000020, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: "Matthew Wilcox (Oracle)" Subject: mm/debug: print hashed address of struct page The actual address of the struct page isn't particularly helpful, while the hashed address helps match with other messages elsewhere. Add the PFN that the page refers to in order to help diagnose problems where the page is improperly aligned for the purpose. Link: http://lkml.kernel.org/r/20200709202117.7216-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Rapoport Reviewed-by: John Hubbard Cc: "Kirill A. Shutemov" Cc: Vlastimil Babka Cc: William Kucharski Signed-off-by: Andrew Morton --- mm/debug.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/mm/debug.c~mm-print-hashed-address-of-struct-page +++ a/mm/debug.c @@ -95,17 +95,17 @@ void __dump_page(struct page *page, cons */ mapcount = PageSlab(head) ? 0 : page_mapcount(page); - pr_warn("page:%px refcount:%d mapcount:%d mapping:%p index:%#lx\n", + pr_warn("page:%p refcount:%d mapcount:%d mapping:%p index:%#lx pfn:%#lx\n", page, page_ref_count(head), mapcount, mapping, - page_to_pgoff(page)); + page_to_pgoff(page), page_to_pfn(page)); if (compound) { if (hpage_pincount_available(page)) { - pr_warn("head:%px order:%u compound_mapcount:%d compound_pincount:%d\n", + pr_warn("head:%p order:%u compound_mapcount:%d compound_pincount:%d\n", head, compound_order(head), compound_mapcount(head), compound_pincount(head)); } else { - pr_warn("head:%px order:%u compound_mapcount:%d\n", + pr_warn("head:%p order:%u compound_mapcount:%d\n", head, compound_order(head), compound_mapcount(head)); } _