From patchwork Sun Dec 18 10:19:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hyeonggon Yoo <42.hyeyoo@gmail.com> X-Patchwork-Id: 13076026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8219C4332F for ; Sun, 18 Dec 2022 10:19:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4EFEE8E0007; Sun, 18 Dec 2022 05:19:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 479718E0001; Sun, 18 Dec 2022 05:19:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 319EE8E0007; Sun, 18 Dec 2022 05:19:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 240D28E0001 for ; Sun, 18 Dec 2022 05:19:47 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id F18A81201F5 for ; Sun, 18 Dec 2022 10:19:46 +0000 (UTC) X-FDA: 80255030772.13.882609E Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by imf21.hostedemail.com (Postfix) with ESMTP id 5545F1C0011 for ; Sun, 18 Dec 2022 10:19:45 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=bWK2HUZi; spf=pass (imf21.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.171 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671358785; a=rsa-sha256; cv=none; b=0x71AQUZPqhHk+G7uhOWEWAF+Pgc3UZgsqpaU96eWncFI6nPJ3lv3f+YYQKYY4YTeR88aF UGfy9kMjAoza7pnsnq+/ObWXM4IudcN4q7CeLd/BS5rqLowROt+d7c8exFgKAkFCTe5ZoI +Q69V328LjcOMBBidf1r/hrX1DqoyXE= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=bWK2HUZi; spf=pass (imf21.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.171 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671358785; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=USiySWTOh1CETJ0YaQTua6YhrtEN1JVTOEmqLQEb+nc=; b=Lr7JletZi/x2chqNFRqtnbIaLujsYELqTiTQAX8zTbXXsgubOoTBuFAFUgTzl+jhuHeNvB /S56cTFZUTprybeAJtbMvJ58NoJd3ZQtLkBBcmumySA7ywo2AQFrUDvEe6Jx0sy2GVRQpZ 60/CH0btbeqLV0HTuzqgvdek8jfskuU= Received: by mail-pl1-f171.google.com with SMTP id a9so6394062pld.7 for ; Sun, 18 Dec 2022 02:19:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=USiySWTOh1CETJ0YaQTua6YhrtEN1JVTOEmqLQEb+nc=; b=bWK2HUZitrMe3mACDaUw2c6Wef/saP741RD5s+0F3g7SGx1ocQQGgA3KQo+0LBvYS/ 1AdRIdFNalVr6Szi/z72zeefH3ICn+Qd2dC6Egi/6wkaWWyA+Y8tlGU6Vs47aChPbtx9 O2bhTef3xY1/9W+oenTVALT0gBi6whnKo7eS8DdlerbX94y/feD283qBLf3rKcBD0RWJ Ly8Jz4yocDAlnLz43nG6gfP+R/veNmiX/jkOnAAJSZTii0CEIZwWBfSX3IBcpw3Fh4dY 0ZpF7xElp98dXVYTyhT5eI8lcFhxdm5C6i+8dRC08sLo9plyGPmZI4uv++OYORdWD2hu 8VxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=USiySWTOh1CETJ0YaQTua6YhrtEN1JVTOEmqLQEb+nc=; b=qdeNfMbo+rMgTWbge8zMDFLwDEmAZkRZuu/47EYPm8XezJTo3E2Vu0wuM40AMiYxfG S7qlEZm15+pKtnAJerN707yiBogQa7Wiakahv18/KUTAsh9CkWKH/OGIykGc67mR5J/l wf4Lc9G0Xxd2J+n2WVoWxv+es4r+jvougVKf7ADpnMpg2NoNzF3t4fWE74RHDx9T15KR oTpjKcf5WRXxIS/hu7/iE/aNR1lYWMElB8tRuOYUvRj3+OAme7xQiO4V8RiaquMXy0DE hu/IRfhJlYNeB4yt+o31R8PbfnmWf1N6iG8cRyBDkSXbcQudoWO069sQKgKjg+XozCQS tUqw== X-Gm-Message-State: AFqh2kp6a4x15UdiSqypPBcC2rHtbnktCwByufjdsicwrDUqZORTec6c tcFJlzPJeoWNyt2t14q/pXM= X-Google-Smtp-Source: AMrXdXvKE5/ZFpRCUmyw11BJzvZeV02MBGI0qTsOGM0h4S9hXXpZmBes+89J/16brPjl+7ootVUf/Q== X-Received: by 2002:a17:902:d4c6:b0:191:a19:e768 with SMTP id o6-20020a170902d4c600b001910a19e768mr7877083plg.48.1671358784136; Sun, 18 Dec 2022 02:19:44 -0800 (PST) Received: from hyeyoo.. ([114.29.91.56]) by smtp.gmail.com with ESMTPSA id ik11-20020a170902ab0b00b001897bfc9800sm4789791plb.53.2022.12.18.02.19.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Dec 2022 02:19:43 -0800 (PST) From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>, =?utf-8?b?SE9SSUdVQ0hJIE5BT1lBKA==?= =?utf-8?b?5aCA5Y+j44CA55u05LmfKQ==?= , Joe Perches , Petr Mladek , Andy Shevchenko , Matthew WilCox , David Hildenbrand , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC v3 4/4] mm/debug: use %pGt to print page_type in dump_page() Date: Sun, 18 Dec 2022 19:19:01 +0900 Message-Id: <20221218101901.373450-5-42.hyeyoo@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20221218101901.373450-1-42.hyeyoo@gmail.com> References: <20221218101901.373450-1-42.hyeyoo@gmail.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 5545F1C0011 X-Stat-Signature: qq6rd8iot7u7x4ppiohr4i5jt1hf4gww X-HE-Tag: 1671358785-81999 X-HE-Meta: U2FsdGVkX1+OddqGxsljLNtp45nYfS3ujjSbtj9D+5cNihIQhGyHxj1156QbSLzmHVbpdylw7mH+qKMOwUJ4h+B3vMthhza48PIoPROL/27TIIXVFrkMjprneTpnb96PBR3nH2ocl0r8GjNMtPiRimvN0ZsPdYjvRph3oS7d3dLToRSm/xIwsPGESbSGjriA6QGynYKlo1XAuGmQY/6FenmjP1hakbgwz1oJZBX8pkA/0H7EQRrx8E3uZsoeRxyhDzc5/I+fjhMGvCzu5CwPp9FukzrzXz96Oanoz8E86rb+4X3wQN6D5beYXOq7fYNgB+JHfZsJG0S/JBaVYm7w4d0lnLvaB7WCFdMXvj0RcQ0Tjl7lK7VKJ1BVboYcHNOWvHE19JOHOm3aC7HgAQfk5tEtz9wmGdXICBe4T0RDyXA3WrB3DihTnbAJlStbpZf7jOzmR/eBCIMwtKeHm3G8NM2ZquBH2Fm0bLksWrN58C9PYtE/nWmstisuvJtiW5g2ezIWv/GpqQKcq33iFsG9OvA0ltjzqRwg5YhQ/G7c7otKUqy6kJcC4GDejCFrDU6aiRTX2i1Evy2AzAwTq3emsrRhXRuxK6OPfhKhxNGE05sXpt14mVTm8StdR41Kwtes4jMmDUlsWHdPvq3oWv/LI1xWRMgZQsOWhDMYZLI5E7qng7blqVVWsuXzAT+o2IYIx3YP4C8xqfEsauETCWVA/3ALE70wS297vwr0vH1gQy/AU2059n8b+2f301E/uQ9Irj/x23B5H4JMtqOEf9j3sIH0b06tH51Iq2zdxM0P9xFJmLFxtcDnc9j8X9SPvuSka/lp0em1t8AGQr3En4vHpvCEKxAdpIS0Axg9d2sslch95ujRAOffkKjuwo/nP7YyizK/vYmFzgcGWKU2/oHIszA/Fz17SVR/lF8uiRJfas79I+P5h1trG8YHwVlSCuFF/6WBh63VSc4RATIy0aI K8b7aI9c ZU1thDCvDYROwU8AeUVs1ikAo6cQsEEtugc5Slz72rl+53cBE7SLGT7414FO821H1s5o/oBTANqlfyv3J2Jwyr49e56mvvrBYTOFpd1QwQW1H3A/zyUI/2N0v5WdPJEedOojnMJZYgK/mNjN/xOmGOZ3uC3Q5n8IMBnPlpsjThll0LvsZoI8wIneplCZFtD0PD8XS1lKB1evbiDUHrNbMNQJ/wDVQBT3f2nAY0052iDKxyLUUjhguCn01+H3Pqyg4KbYxzSfPlP7cfAyI4JYjBc42ghJ7+jVberdl 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: Some page flags are stored in page_type rather than flags field. Use newly introduced page type %pGt in dump_page(). Below are some examples: page:00000000e47d45a7 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10175e flags: 0x200000000000000(node=0|zone=2) page_type: 0xffffffff() raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: just after alloc_pages() page:00000000e47d45a7 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10175e flags: 0x200000000000000(node=0|zone=2) page_type: 0xffefffff(slab) raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffefffff 0000000000000000 page dumped because: page with PG_slab set page:00000000e47d45a7 refcount:1 mapcount:2 mapping:0000000000000000 index:0x0 pfn:0x10175e flags: 0x200000000000000(node=0|zone=2) page_type: 0x1() raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 0000000100000001 0000000000000000 page dumped because: page with _mapcount == 1 Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> --- mm/debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/debug.c b/mm/debug.c index 5ce6b359004a..d6a0eb0a9bb8 100644 --- a/mm/debug.c +++ b/mm/debug.c @@ -120,6 +120,8 @@ static void __dump_page(struct page *page) pr_warn("%sflags: %pGp%s\n", type, &head->flags, page_cma ? " CMA" : ""); + pr_warn("page_type: %pGt\n", &head->page_type); + print_hex_dump(KERN_WARNING, "raw: ", DUMP_PREFIX_NONE, 32, sizeof(unsigned long), page, sizeof(struct page), false);