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=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 0D0F2C433E0 for ; Mon, 29 Jun 2020 22:51:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B9EEB20702 for ; Mon, 29 Jun 2020 22:51:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Y2SSE6S5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9EEB20702 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 3C4A08D0013; Mon, 29 Jun 2020 18:51:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 34D708D000F; Mon, 29 Jun 2020 18:51:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 264418D0013; Mon, 29 Jun 2020 18:51:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0130.hostedemail.com [216.40.44.130]) by kanga.kvack.org (Postfix) with ESMTP id 111948D000F for ; Mon, 29 Jun 2020 18:51:40 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 7A62A180AD80F for ; Mon, 29 Jun 2020 22:51:39 +0000 (UTC) X-FDA: 76983747918.09.hen98_5504cb726e73 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 46D64180AD806 for ; Mon, 29 Jun 2020 22:51:39 +0000 (UTC) X-HE-Tag: hen98_5504cb726e73 X-Filterd-Recvd-Size: 3178 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Mon, 29 Jun 2020 22:51:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=b2IQqiMgfT/QUlhiH9BkFFG9D91iqPbEel6CbRIZIJo=; b=Y2SSE6S5Qk6MoK3WbGjM3hQRow l1DEgQgQKUdpYe90PNs5fj8Kp74IjZMiaexQ2SjELrfziclEmyTwEgSyPinTKsx68OSxW3mnk5Y3C 3R9BrlmipEAxB4v9cd1aCuzcTRl+SLxGbRxVw0vYAypQxUxE0xz23zGJxK8pvdAgacn5Z5KUKtPns uOi6WHnDEFpxtcPFUfCJSZglbeU+uXYmg84U8xxADD4MBdiyO/LP/Hh0ex68BEVadVYA6q84X4sse 5jLcKnq7fhTcLhY2TKJRXZ4gdjJiiocZ4DpaaAKz3DibyIF3v0UIUNtE3JkgJfZxX8BAlQWJPucW9 bloqhIoQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jq2cg-0003bg-Dm; Mon, 29 Jun 2020 22:51:34 +0000 Date: Mon, 29 Jun 2020 23:51:34 +0100 From: Matthew Wilcox To: John Hubbard Cc: linux-mm@kvack.org, Andrew Morton , Vlastimil Babka Subject: Re: [PATCH 1/3] mm: Print head flags in dump_page Message-ID: <20200629225134.GL25523@casper.infradead.org> References: <20200629151918.15537-1-willy@infradead.org> <20200629151918.15537-2-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 46D64180AD806 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000355, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jun 29, 2020 at 03:38:13PM -0700, John Hubbard wrote: > On 2020-06-29 08:19, Matthew Wilcox (Oracle) wrote: > > Tail page flags contain very little useful information. Print the head > > page's flags instead (even though PageHead is a little misleading). > > You are right about the tail page. And the raw output provides the tail > page flags, in case someone *really* needs to dig into tail page problems, > so that's all good. > > However, I just gave this a spin, and seeing the "|head" in the list for > my "tail page: dump_page test" is also slightly misleading for me, too. We could also do ... @@ -48,6 +48,8 @@ void __dump_page(struct page *page, const char *reason) struct address_space *mapping; bool page_poisoned = PagePoisoned(page); bool compound = PageCompound(page); + unsigned long flags = page->flags; + /* * Accessing the pageblock without the zone lock. It could change to * "isolate" again in the meantime, but since we are just dumping the @@ -165,7 +162,9 @@ void __dump_page(struct page *page, const char *reason) out_mapping: BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS + 1); - pr_warn("%sflags: %#lx(%pGp)%s\n", type, head->flags, &head->flags, + if (head != page) + flags = head->flags & ~PG_head; + pr_warn("%sflags: %#lx(%pGp)%s\n", type, flags, &flags, page_cma ? " CMA" : ""); hex_only: