Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp1145767rwj; Sun, 18 Dec 2022 03:05:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf7C9phCtWMLJozcJFbVRVmpU+tgxQma1QWrkqzxvB8FQTE9dYh9n93FhT4GbMQ5xBk0VDwP X-Received: by 2002:a05:6a20:4919:b0:af:6f28:7c42 with SMTP id ft25-20020a056a20491900b000af6f287c42mr17885909pzb.62.1671361501083; Sun, 18 Dec 2022 03:05:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671361501; cv=none; d=google.com; s=arc-20160816; b=e9IEqP23Pp1J/d9y4e9YPaeCiBweDh8vEdl67p5tgJ3v5Z4rECMOddiUIdKJww4qLB ooZvns7ie0g726QdnVORLp8+8AgCntMWm62FlA3J5JFApiS8BzoCQjnIU0yuOJNc4FxC yREeQ1Ks10J0oNroquG6ptExYZ1K4HlAwlcBgKzWcB84FYQA7GqKAeD5vlOwOLzTqivo HwTscVPYJNyXGiilDTfjCObKW9R9/4meEba3ijsZfxaJlA0eXRZAB61V0yie4rIioD2i RI2O0/MmcQfiV7JM7gtwPOpJu1USbrGv9IfEudpOcoAD4f65tgKiXXKJnn96JbuEUkSg lmAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=USiySWTOh1CETJ0YaQTua6YhrtEN1JVTOEmqLQEb+nc=; b=0ulJ13BTjjLt1nxxnF+bQi7TVtXFBeeBKKfEBDRQM90697iqqEZtggnMBKKN5OWARs d925XRjSdo56MEXijH4vMRCbLVFSQH/FIy2091+t1sPGncT5Fx1PrpKQeglI3BsEalcS MY2ZEXwfy8xfKgTAJjIqkWIEckKTQaYdWuR7KjfpllmG6y7BpxSG+Zq5u31cKZt+Lv1w g/u51OfqRtILNwx1FIg03uiRLIKmZsGTIY7lMig3SN1bGLqJcAluUQjriBS72fSZd1RK RG/hJOVeT08oP+fFdjE6QGPWwTSYUSNMnA7nm3AnyYSIVxU+9H5nDk9gFslfd6OkwBnO qkNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bWK2HUZi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a633606000000b0047844657797si8439509pga.115.2022.12.18.03.04.50; Sun, 18 Dec 2022 03:05:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bWK2HUZi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230255AbiLRKUV (ORCPT + 69 others); Sun, 18 Dec 2022 05:20:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230382AbiLRKUA (ORCPT ); Sun, 18 Dec 2022 05:20:00 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2531DF4A for ; Sun, 18 Dec 2022 02:19:44 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id e7-20020a17090a77c700b00216928a3917so10268171pjs.4 for ; Sun, 18 Dec 2022 02:19:44 -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=UzNEefuQclERKbqk1E6A/3EH01/op6iwjmNxIRGHV4EoAvzs6e2jCEEUknyWrtxFzL xzvo0rM5lIjerWd3rrOnf+gpNqHbgCc4WffLNe1rF66pVq6en6XcWXtko5tychLkbp4V Y4rnCKC0I4G1c7pvOgPvoVjcRTlxGLGbBXiRWfU7MsEaVnAeRkaNpfjXb+Yw+yzK75qo xA08BqCe+P5IyP8tqIHwfuacMzCyZU64XHRsahrS2mOyPY8NwEzxl+Q38RHuv5T9sTNo M7VV1lUj95ALHHZiXB3KgMZ+0rNBsBMNNNEacsweohJ59wEcVj8fhz8wTJU8j5DTo+S5 pY9Q== X-Gm-Message-State: AFqh2koE4nbzXKpkveooMCIqrM/Rr8GwBKzd7AWcfCz1zRbY9sy1tszl R7o4b00PpdLzf5lSh0LqAlo= 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?q?HORIGUCHI=20NAOYA=28=E5=A0=80=E5=8F=A3=E3=80=80=E7=9B=B4=E4=B9=9F=29?= , 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.32.0