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=-11.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 A4279C433E2 for ; Tue, 14 Jul 2020 12:04:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6CDF822227 for ; Tue, 14 Jul 2020 12:04:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6CDF822227 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D0C126B0002; Tue, 14 Jul 2020 08:04:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CBBAA6B0003; Tue, 14 Jul 2020 08:04:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD29B6B0005; Tue, 14 Jul 2020 08:04:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id A79246B0002 for ; Tue, 14 Jul 2020 08:04:13 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 248CF2DFC for ; Tue, 14 Jul 2020 12:04:13 +0000 (UTC) X-FDA: 77036548386.10.trick59_0d048ec26ef0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id B3A9116A4D2 for ; Tue, 14 Jul 2020 12:03:56 +0000 (UTC) X-HE-Tag: trick59_0d048ec26ef0 X-Filterd-Recvd-Size: 3445 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Jul 2020 12:03:56 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B8950B1CE; Tue, 14 Jul 2020 12:03:57 +0000 (UTC) Subject: Re: [PATCH v2 2/6] mm: Dump compound page information on a second line To: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Cc: Andrew Morton , John Hubbard , "Kirill A. Shutemov" , William Kucharski , Mike Rapoport References: <20200709202117.7216-1-willy@infradead.org> <20200709202117.7216-3-willy@infradead.org> From: Vlastimil Babka Message-ID: Date: Tue, 14 Jul 2020 14:03:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200709202117.7216-3-willy@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: B3A9116A4D2 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000067, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 7/9/20 10:21 PM, Matthew Wilcox (Oracle) wrote: > Simplify both the implementation and the output by splitting all the > compound page information onto a second line. > > Reported-by: John Hubbard > Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Vlastimil Babka > --- > mm/debug.c | 30 ++++++++++++------------------ > 1 file changed, 12 insertions(+), 18 deletions(-) > > diff --git a/mm/debug.c b/mm/debug.c > index e5de63406b59..f35c1ae1a7a5 100644 > --- a/mm/debug.c > +++ b/mm/debug.c > @@ -89,27 +89,21 @@ void __dump_page(struct page *page, const char *reason) > */ > mapcount = PageSlab(head) ? 0 : page_mapcount(page); > > - if (compound) > + pr_warn("page:%px refcount:%d mapcount:%d mapping:%p index:%#lx\n", > + page, page_ref_count(head), mapcount, mapping, > + page_to_pgoff(page)); > + if (compound) { > if (hpage_pincount_available(page)) { > - pr_warn("page:%px refcount:%d mapcount:%d mapping:%p " > - "index:%#lx head:%px order:%u " > - "compound_mapcount:%d compound_pincount:%d\n", > - page, page_ref_count(head), mapcount, > - mapping, page_to_pgoff(page), head, > - compound_order(head), compound_mapcount(page), > - compound_pincount(page)); > + pr_warn("head:%px order:%u compound_mapcount:%d compound_pincount:%d\n", > + head, compound_order(head), > + compound_mapcount(head), > + compound_pincount(head)); > } else { > - pr_warn("page:%px refcount:%d mapcount:%d mapping:%p " > - "index:%#lx head:%px order:%u " > - "compound_mapcount:%d\n", > - page, page_ref_count(head), mapcount, > - mapping, page_to_pgoff(page), head, > - compound_order(head), compound_mapcount(page)); > + pr_warn("head:%px order:%u compound_mapcount:%d\n", > + head, compound_order(head), > + compound_mapcount(head)); > } > - else > - pr_warn("page:%px refcount:%d mapcount:%d mapping:%p index:%#lx\n", > - page, page_ref_count(page), mapcount, > - mapping, page_to_pgoff(page)); > + } > if (PageKsm(page)) > type = "ksm "; > else if (PageAnon(page)) >