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.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 3F7CAC35242 for ; Sun, 9 Feb 2020 01:09:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 72FFC22464 for ; Sun, 9 Feb 2020 01:09:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="grjFgK+X" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72FFC22464 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 0DB936B0005; Sat, 8 Feb 2020 20:09:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 08E006B0006; Sat, 8 Feb 2020 20:09:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE3D26B0007; Sat, 8 Feb 2020 20:09:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0208.hostedemail.com [216.40.44.208]) by kanga.kvack.org (Postfix) with ESMTP id D320D6B0005 for ; Sat, 8 Feb 2020 20:09:19 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 87B8E40FE for ; Sun, 9 Feb 2020 01:09:19 +0000 (UTC) X-FDA: 76468805238.15.bears28_515b82d9f010d X-HE-Tag: bears28_515b82d9f010d X-Filterd-Recvd-Size: 4332 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Sun, 9 Feb 2020 01:09:18 +0000 (UTC) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sat, 08 Feb 2020 17:08:16 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Sat, 08 Feb 2020 17:09:17 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Sat, 08 Feb 2020 17:09:17 -0800 Received: from [10.110.48.28] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 9 Feb 2020 01:09:16 +0000 Subject: Re: [PATCH] mm: Improve dump_page() for compound pages To: Matthew Wilcox , CC: "Kirill A . Shutemov" References: <20200208044415.30012-1-willy@infradead.org> <20200208044808.GJ8731@bombadil.infradead.org> X-Nvconfidentiality: public From: John Hubbard Message-ID: <91b9f33e-ee28-e41a-868c-72e8a1186221@nvidia.com> Date: Sat, 8 Feb 2020 17:09:15 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200208044808.GJ8731@bombadil.infradead.org> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1581210496; bh=nN57CDvut9Pp8WOOr5oM6UOEbytKiDuTPfIIwAqkqec=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=grjFgK+Xyxl2pAVal3IC9Ju3QrVeXtgw7xv/sHbe6BjirczrjZA8wAftNg9k2pkPV LvSnkLLsaeBQVdPKt1ceaU1umHxFUMCgs9PC9bdDX5mQukxAVMAa5PRKS2Ru5j+hxv jrF39Xnt8a7tLX7a/SkdRUT7jV+bxKaqRAcSmLvirELyEvrqzGVTvDjVq1eyUzfEhE dRrqAcrIn1TK6+Agzb/NYwgqyhEKF0KRgFWjIW81t+Hzv0mFrVOe3w1xvs4WO0K1GC N4C9M4kVoNqFLDMFIrKKeXGOpf9mizw5InGltBDnfZvrylJbId+MjHtcwBv+MtoZV4 3bWew1un6TiDg== 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 2/7/20 8:48 PM, Matthew Wilcox wrote: > On Fri, Feb 07, 2020 at 08:44:15PM -0800, Matthew Wilcox wrote: >> From: "Matthew Wilcox (Oracle)" >> >> There was no protection against a corrupted struct page having an >> implausible compound_head(). Sanity check that a compound page has >> a head within reach of the maximum allocatable page (this will need >> to be adjusted if one of the plans to allocate 1GB pages comes to >> fruition). In addition, >> >> - Print the mapping pointer using %p insted of %px. The actual value of >> the pointer can be read out of the raw page dump and using %p gives a >> chance to correlate it with an earlier printk of the mapping pointer >> - Print the mapping pointer from the head page, not the tail page >> (the tail ->mapping pointer may be in use for other purposes, eg part >> of a list_head) >> - Print the order of the page for compound pages >> - Dump the raw head page as well as the raw page >> - Print the refcount from the head page, not the tail page >> >> Suggested-by: Kirill A. Shutemov >> Co-developed-by: John Hubbard >> Signed-off-by: Matthew Wilcox (Oracle) > > John, in comparison to the patch I sent earlier today, this version changes: > > - Reorder the things printed in the compound case so that all the information > which is printed for non-compound pages is printed first > - Removed inconsistent space between "compound_mapcount:" and the value > - Print the refcount of the head page instead of the tail (which was the > point of your patch!) > - Print the mapping of the head instead of the tail > - Don't dump the raw head if the page passed in was the head page > Got it, I've snarfed it into my series, thanks very much! thanks, -- John Hubbard NVIDIA