Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp1114666rwj; Sun, 18 Dec 2022 02:21:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf4gKp76EMcFMt593S1pQ0nbrdP75fFMUx18IHk7FFEF4uM/xDHqnXmmjLuCoSSUYGZ48iH5 X-Received: by 2002:a17:907:674b:b0:7ae:5473:fdb8 with SMTP id qm11-20020a170907674b00b007ae5473fdb8mr36635922ejc.22.1671358912182; Sun, 18 Dec 2022 02:21:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671358912; cv=none; d=google.com; s=arc-20160816; b=lYYXXP9f7jduOibgG/EU4bZuokyQzWkA3dzN2xdsDEo0SciBgK+j4FIq9uyo4CFye8 fBRtN2I60D7sHFjZPWDZ+8Fzos4035zPHcZSYtxurwptdtuuwbAeLXFF/Ia0sxBVQrTU Uwvg7s98BupIUg8dT2fYAMNXuoANQYq0lWoPvS+GS00inMuiPwwTI1oEU5M0OWUs/qJ4 n74wELwS/mlYTETooAZWO3F8EsAEdkSO58ECqu/znwSW+7UpqyjCXbVUyrkLEIyHvo6a dcC5TvCrlH3zpcD6aLgZUSY2X1SIWcq3/wiqo4u5/2UUguXZ/iCDK9nGdPfN1c0HKdb1 og5A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ERe/r2sSrZoK/GY0S6LEuDdiHuaRQ2o4UfuW7lVdOJA=; b=xO1399+cC0/U+1de9VeO+W6kY6S7gIIt0EWMEJUtJ8TWMgnQAC1O3jybHLYSNIMHxK eskiHtGkM4WbdwIETtyCeOOUYkz7jHd3/NUwK5caIlSzD9QBMJDpmv50IGBdtC1XYqs6 uwK7oBV7/5K0cq8kd+IPxLDP8sbXCdXjSxLvRBL0UDtsYs5bbbdk/2B9op4mcXPOBl43 XhY5c0qnGMm/zFUIHDsMSEKs1ECuysn7HHk4L/Ua7TzvTYyv/SJQX3UsvZA4ttnlmZQO PO9YpJoibXiIyHOhtlhoIBmppywprwMID7LoKihyqWKJl1GqhpOnmsB85t2gt8QuZu7x CUxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NzidgMsU; 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 dd12-20020a1709069b8c00b007ad855bc09csi7680748ejc.595.2022.12.18.02.21.35; Sun, 18 Dec 2022 02:21:52 -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=NzidgMsU; 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 S230345AbiLRKT3 (ORCPT + 69 others); Sun, 18 Dec 2022 05:19:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230319AbiLRKT0 (ORCPT ); Sun, 18 Dec 2022 05:19:26 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC6D5DEE6 for ; Sun, 18 Dec 2022 02:19:25 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id a9so6393741pld.7 for ; Sun, 18 Dec 2022 02:19:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ERe/r2sSrZoK/GY0S6LEuDdiHuaRQ2o4UfuW7lVdOJA=; b=NzidgMsUv/PXs06KQ1wiEISb3hVNDjxnjvZ03vdtNPZ+wQrwGZ+beCSj1jS5UCnrOm EcwJOQxR5C24LhdzxFXchQ3CjlIgeflvZ9Ffd5od6T7TJMiVhGo3QhVoLKYNIUcqKFrc SB9H7hMqHpwSqMCjPqlardUQjGuslebXpsCBHDuUQ0VFGHomt8PW1+87G9HhJVZBBRvI NJl9sZk1LqboH0x+TGGRD/fl6yVEbou1laIZ8ytEtOJKUVYtqtm2ntB5Ju2PMrpvPtCF w5O0ZWeTaady6ZWy4F7dZIS9qzLSAGmfkTDp4WQWVo9CsE0pOsYLcS3PtTly57hWQwcq zDhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ERe/r2sSrZoK/GY0S6LEuDdiHuaRQ2o4UfuW7lVdOJA=; b=o0OzLldEYxpXWj1haUy9xXw8AxDZVv2TIJzOGbmVvm2RoPo199qgQtcTc9Yc9MG13I eBfqfBqnjT5UPu1YE0CgtC4/F9reglFRxY2kpJrmfXdzpsLyK1DJ6VRxVx5m1et3le60 EWsj+0UscljhxgMgluDxBX84xpFxs/Xnix12ZqBkaIDjYe5mFoP65+3WdjgpObL5Z/Hm e5wWBKAryx5jfqh011+lc1+blrinP6jlF1RBwE3XAKGUUZvUvknAyx15WdpyYZRnIiYV peAFvxNCXCJQuKl6zcfyvFl0zg/U6azaeAUpkdvqrQpZgKH72cJZUgM7x80bCBjYbtzO /8nQ== X-Gm-Message-State: AFqh2kpmIUnDAIajBuCD5O3or7de4PhQ3y+iXnKciRRRw0zh46iGwpfg WFNABNh1HGC1ntXaOoye0h8= X-Received: by 2002:a17:902:e80c:b0:189:985c:849d with SMTP id u12-20020a170902e80c00b00189985c849dmr7076606plg.1.1671358765219; Sun, 18 Dec 2022 02:19:25 -0800 (PST) Received: from hyeyoo.. ([114.29.91.56]) by smtp.gmail.com with ESMTPSA id ik11-20020a170902ab0b00b001897bfc9800sm4789791plb.53.2022.12.18.02.19.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Dec 2022 02:19:24 -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 0/4] move PG_slab flag to page_type Date: Sun, 18 Dec 2022 19:18:57 +0900 Message-Id: <20221218101901.373450-1-42.hyeyoo@gmail.com> X-Mailer: git-send-email 2.32.0 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 RFC v2: https://lore.kernel.org/linux-mm/20221106140355.294845-1-42.hyeyoo@gmail.com/ This patch series moves PG_slab page flag to page_type, freeing one bit in page->flags and introduces %pGt format that prints human-readable page_type like %pGp for printing page flags. See changelog of patch 2 for more implementation details. Thanks everyone that gave valuable comments. v2 -> v3: - dropped show_page_types() in a thought that it is not interesting to track refcount of non-usermapped pages. - added patch 1 that cleans up MF_MSG_SLAB in hwpoison - split implementation and application of %pGt to separate patches. - instead of printing "no page_type for ..." in %pGt, just print '0x()' for a page that does not use page_type field. Hyeonggon Yoo (4): mm/hwpoison: remove MF_MSG_SLAB from action_page_types mm: move PG_slab flag to page_type mm, printk: introduce new format %pGt for page_type mm/debug: use %pGt to print page_type in dump_page() Documentation/core-api/printk-formats.rst | 3 +- fs/proc/page.c | 13 ++-- include/linux/mm_types.h | 11 ++-- include/linux/page-flags.h | 77 ++++++++++++++++------- include/trace/events/mmflags.h | 8 ++- kernel/crash_core.c | 3 +- lib/test_printf.c | 26 ++++++++ lib/vsprintf.c | 21 +++++++ mm/debug.c | 7 +++ mm/internal.h | 1 + mm/memory-failure.c | 10 --- mm/slab.c | 44 ++++++++----- mm/slab.h | 3 +- 13 files changed, 162 insertions(+), 65 deletions(-) -- 2.32.0