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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 D4363C433E0 for ; Thu, 14 Jan 2021 19:02:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4DC0A23B31 for ; Thu, 14 Jan 2021 19:02:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DC0A23B31 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 99C428D010C; Thu, 14 Jan 2021 14:02:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 94D5E8D00F0; Thu, 14 Jan 2021 14:02:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 862C28D010C; Thu, 14 Jan 2021 14:02:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0232.hostedemail.com [216.40.44.232]) by kanga.kvack.org (Postfix) with ESMTP id 6C7528D00F0 for ; Thu, 14 Jan 2021 14:02:32 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 367B6824556B for ; Thu, 14 Jan 2021 19:02:32 +0000 (UTC) X-FDA: 77705301744.11.robin48_2111ce527529 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 06910180F8B87 for ; Thu, 14 Jan 2021 19:02:31 +0000 (UTC) X-HE-Tag: robin48_2111ce527529 X-Filterd-Recvd-Size: 2533 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Thu, 14 Jan 2021 19:02:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=o8rSun+JY0feCLIOfU5CG9Mp4t8ZiQGGklpC89Q+96E=; b=A4TMY4OJMbA2Q0CyuVCBVCoGGK aecd0mO/B5bzSINKtoKWWficWlxAWHxUjVsIUeXLh3GUCnp8J3VxNGb4mJuQ8J8vsvqmx6NrWQTJb rqkcgpbbLIQHfkdbdTHylrTkxmlF1o+u+EBIpHuHrqP2juXlVX70q9NCXZLcB/pVDXEt4Rb+cF7Zj JrqUKmZDDGoIzay2mXEpU2eaaHIklkMUC9111wTmQDtkFiGyQxrf/1Gatvb4DAuIyocYV7Wyms35o fI5KlikqvmT1Dzv4mAyFms+/0JuhZmRZQipEovP/e7KFI9KN95d8HdXphSppmruZIqIDmdYSG+Sct 2sgsuaxA==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1l07sg-007wrS-8D; Thu, 14 Jan 2021 19:02:08 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton , linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" Subject: [PATCH] mm/debug: Improve memcg debugging Date: Thu, 14 Jan 2021 19:02:00 +0000 Message-Id: <20210114190200.1894484-1-willy@infradead.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: The memcg_data is only valid on the head page, not the tail pages. Change the format and location of the printout within the dump to match the other parts of struct page better. Signed-off-by: Matthew Wilcox (Oracle) --- mm/debug.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/debug.c b/mm/debug.c index 8a40b3fefbeb..0bdda8407f71 100644 --- a/mm/debug.c +++ b/mm/debug.c @@ -110,6 +110,11 @@ void __dump_page(struct page *page, const char *reas= on) head_compound_mapcount(head)); } } + +#ifdef CONFIG_MEMCG + if (head->memcg_data) + pr_warn("memcg:%lx\n", head->memcg_data); +#endif if (PageKsm(page)) type =3D "ksm "; else if (PageAnon(page)) @@ -180,11 +185,6 @@ void __dump_page(struct page *page, const char *reas= on) =20 if (reason) pr_warn("page dumped because: %s\n", reason); - -#ifdef CONFIG_MEMCG - if (!page_poisoned && page->memcg_data) - pr_warn("pages's memcg:%lx\n", page->memcg_data); -#endif } =20 void dump_page(struct page *page, const char *reason) --=20 2.29.2