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=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 B34B1C433DF for ; Mon, 29 Jun 2020 21:55:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6FCC4206A5 for ; Mon, 29 Jun 2020 21:55:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="kgUPeFWI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FCC4206A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id F22966B00AE; Mon, 29 Jun 2020 17:55:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ED2DA6B00AF; Mon, 29 Jun 2020 17:55:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DEA0F6B00B0; Mon, 29 Jun 2020 17:55:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0245.hostedemail.com [216.40.44.245]) by kanga.kvack.org (Postfix) with ESMTP id CAC6A6B00AE for ; Mon, 29 Jun 2020 17:55:24 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4BFC12DFD for ; Mon, 29 Jun 2020 21:55:24 +0000 (UTC) X-FDA: 76983606168.27.gun17_3a063d826e72 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 1C3B63D663 for ; Mon, 29 Jun 2020 21:55:24 +0000 (UTC) X-HE-Tag: gun17_3a063d826e72 X-Filterd-Recvd-Size: 5353 Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Mon, 29 Jun 2020 21:55:23 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 29 Jun 2020 14:54:33 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 29 Jun 2020 14:55:22 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 29 Jun 2020 14:55:22 -0700 Received: from [10.2.91.207] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 29 Jun 2020 21:55:21 +0000 Subject: Re: [PATCH 0/3] Improvements for dump_page() To: "Matthew Wilcox (Oracle)" , , Andrew Morton CC: Vlastimil Babka References: <20200629151918.15537-1-willy@infradead.org> From: John Hubbard Message-ID: Date: Mon, 29 Jun 2020 14:55:21 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200629151918.15537-1-willy@infradead.org> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1593467673; bh=sqbiih5U8Zh3nq6L/ExSpWC7Khlro1eDRxhIVMTOb/g=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=kgUPeFWIdWdwzULkn3b/UpYQPqjpFLzs0yMUbz5fScGQVya4csRrLZFBIqyPiPEqv J2xWjMCl1BseO7PMthsIrRKdLASUkhGs5P94g0Imu1Yt0by/qdJvVyBRRHUViJ/DWa lfMeGfDlKgXV5hZDfqWEP/cyQqDZTiShpO5V/FiWnyC7LI2rYdwozLtIECKEiNGUe1 9Rn78Yutw8DypCB3TOfOg8BaXi6knCjE70PIABNVbp/oonhuqr8MMecKNarQnlw9PL p/UC21AcZviadU+bKjHjTdUEnq3lrEeOsOjXNVUYBUMM1TgB3yoFVSpGBaYCaThWuZ d3eLQUVLXJeIQ== X-Rspamd-Queue-Id: 1C3B63D663 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 2020-06-29 08:19, Matthew Wilcox (Oracle) wrote: > I've been looking at a lot of calls to dump_page() recently due to the > THP work, and these three patches make my life easier. Please consider > applying. > > Matthew Wilcox (Oracle) (3): > mm: Print head flags in dump_page > mm: Print the inode number in dump_page > mm: Print hashed address of struct page > > mm/debug.c | 22 ++++++++++++---------- > 1 file changed, 12 insertions(+), 10 deletions(-) Cool! I've got a few minor feedback comments coming for the individual patches, but an easy question first: For the FOLL_PIN pages, I left in a minor mess: the lines are basically 2x too long. Would you be interested in folding in something approximately like this, below, to one of your patches? It's just a line break, effectively. It generates output like this: [ 260.545212] page:0000000035202f6e refcount:513 mapcount:1 mapping:0000000000000000 index:0x0 [ 260.552834] head:0000000035202f6e order:9 compound_mapcount:1 compound_pincount:512 [ 260.560087] anon flags: 0x17ffe000001000e(referenced|uptodate|dirty|head) [ 260.565993] raw: 017ffe000001000e ffffffff83649ca0 ffffea0020758008 ffff888890f03839 [ 260.572888] raw: 0000000000000000 0000000000000000 00000201ffffffff 0000000000000000 [ 260.579745] page dumped because: gup_benchmark: head page: dump_page test (I'm not sure if the indentation is a good idea or not, actually.) Or if it's too much fuss, I can send it separately with your series as a prerequisite: diff --git a/mm/debug.c b/mm/debug.c index fcf3a16902b2..d522bf24e3ff 100644 --- a/mm/debug.c +++ b/mm/debug.c @@ -87,19 +87,22 @@ void __dump_page(struct page *page, const char *reason) if (compound) if (hpage_pincount_available(page)) { pr_warn("page:%p refcount:%d mapcount:%d mapping:%p " - "index:%#lx head:%p order:%u " - "compound_mapcount:%d compound_pincount:%d\n", + "index:%#lx\n", page, page_ref_count(head), mapcount, - mapping, page_to_pgoff(page), head, - compound_order(head), compound_mapcount(page), + mapping, page_to_pgoff(page)); + pr_warn(" head:%p order:%u compound_mapcount:%d " + "compound_pincount:%d\n", + head, compound_order(head), + compound_mapcount(page), compound_pincount(page)); } else { pr_warn("page:%p refcount:%d mapcount:%d mapping:%p " - "index:%#lx head:%p order:%u " - "compound_mapcount:%d\n", - page, page_ref_count(head), mapcount, - mapping, page_to_pgoff(page), head, - compound_order(head), compound_mapcount(page)); + "index:%#lx\n", + page, page_ref_count(head), mapcount, mapping, + page_to_pgoff(page)); + pr_warn(" head:%p order:%u compound_mapcount:%d\n", + head, compound_order(head), + compound_mapcount(page)); } else pr_warn("page:%p refcount:%d mapcount:%d mapping:%p index:%#lx\n", thanks, -- John Hubbard NVIDIA