From patchwork Mon Jan 30 04:25:11 2023 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: 13120404 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 62A59C54EAA for ; Mon, 30 Jan 2023 04:25:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9FABC8E0001; Sun, 29 Jan 2023 23:25:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9AA8D6B0073; Sun, 29 Jan 2023 23:25:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 84B378E0001; Sun, 29 Jan 2023 23:25:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 761156B0072 for ; Sun, 29 Jan 2023 23:25:41 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 11A4FC0B2E for ; Mon, 30 Jan 2023 04:25:41 +0000 (UTC) X-FDA: 80410176882.16.724F0C3 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by imf15.hostedemail.com (Postfix) with ESMTP id 60E52A0004 for ; Mon, 30 Jan 2023 04:25:39 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=eZ17fd6e; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf15.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.181 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675052739; 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:references:dkim-signature; bh=KhPJEWpOfk1ykeQU4U3ngSaMOT4Kg+4FPcVKFWkho0s=; b=wXsWLUoYsu5FhYS0BHfZ7v/JivL1+Xeih9ypSkRXSsWJSwh/U7Zb5x3b9wT+/5uGEwDKa9 lKy1Esc62PwJ+0px2rGlUax2MxO5oKF+WdDnSejqXtWtDQ5gztl3KPUED70D+2ldBJ0RnO qfC3PYRuP+fisbaBYdCkXd19IeFG1DY= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=eZ17fd6e; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf15.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.181 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675052739; a=rsa-sha256; cv=none; b=RAchLD8dQw9nC8LtjQ/VYAjSKAIdWjC3ubMs3xzOlmM7kbJ2GA7cWLGT7xNVLquntO75hJ hKMhZAGJxl3NiXWyx4vV6tFUpKlmMP3aeNhrp1fVDrr0Kj03Q6ptegdT7URl7Y4LABJVx5 EYlX7jJB0V0hmo4pr9UoELXjw/4s+pQ= Received: by mail-pl1-f181.google.com with SMTP id z1so2789344plg.6 for ; Sun, 29 Jan 2023 20:25:39 -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=KhPJEWpOfk1ykeQU4U3ngSaMOT4Kg+4FPcVKFWkho0s=; b=eZ17fd6e3UlSZGtxd55lTgEig1YRMVdMcln2sRtnEr34qVlahjw+yrtUdNbJ3NuctB elSELCKoof0FFDSVPi0Du+oVUH1NX655Z93RdeeuvPy+Twi2n5TzjGTTqdFZJF354slD Yn6m8+PxZuDeyNNmGNQD4gzwtrTsGP3TevhoUMNcBg8LodXmt8ezZel4++1uK9oDQCq/ UgCPxT0Ru8zWd6Ow+ge2UOB4ugZQtnbfqtvxDImWnttF3z4H1Gokb7kIHi7jcy4Cb9X9 03WXef9zNIH3UKub22yx0woGdBYf+xOmMWwpjWAlDdKvzUY//N91ApbCdM8qhOtDlD2n OTIw== 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=KhPJEWpOfk1ykeQU4U3ngSaMOT4Kg+4FPcVKFWkho0s=; b=iMsPiQLkYcpb8cBHzfR4XldZYxs2wmKcORb62vFtXXZNx4XGA/O+2mjDoPd75bD04Z Xd8t9/rHbn/KZpf4TuMsw5G7NcNVH0kcoZPqy0SM2dRdrI6VzJxTa85KAa1vun+vBZis WMAqY4AgQMb7u8F1l9X77mYCvqAml/oS3P7Th2FQMS9K4OyKm8y/VWZdS0jobGbbTKXd ZZeB0kDwXVSUZgW3+p65oGv5x2yafdhS6BUmJKzQXK+lSEWwjjBbO0kS9VrWPZc7fzBR m9+3Mn8TdnJojt0VjVf8yq4BGPdteF3tYwupwn61ofsWZOZeW+e6L+gEcSXxP7uIu1QW 48cg== X-Gm-Message-State: AO0yUKWQDFY44TFi+XH4BnyBwSuX7TWCevcElHqT1uIf58R4rnyYMF3Q mY+DQwT3RWEUOCpeJ6K+MsI= X-Google-Smtp-Source: AK7set/PKXPnYT8fiYnv7DlanYGwDupypUZWbD4XKw3xmaSADOZs4RDLu+OTJnqIAeMmZ0UYIn2Uqg== X-Received: by 2002:a05:6a20:441f:b0:bc:8aba:4fa0 with SMTP id ce31-20020a056a20441f00b000bc8aba4fa0mr9246743pzb.31.1675052738014; Sun, 29 Jan 2023 20:25:38 -0800 (PST) Received: from localhost.localdomain ([114.29.91.56]) by smtp.gmail.com with ESMTPSA id 138-20020a621790000000b0059312530b54sm4275969pfx.180.2023.01.29.20.25.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Jan 2023 20:25:37 -0800 (PST) From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Andrew Morton Cc: Joe Perches , Petr Mladek , Andy Shevchenko , Steven Rostedt , Vlastimil Babka , Matthew WilCox , David Hildenbrand , Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH mm-unstable v4 0/3] mm, printk: introduce new format for page_type Date: Mon, 30 Jan 2023 13:25:11 +0900 Message-Id: <20230130042514.2418-1-42.hyeyoo@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 60E52A0004 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: 33k6y57aos6objuefz717wnqsxty3ix6 X-HE-Tag: 1675052739-990189 X-HE-Meta: U2FsdGVkX1/Mx47nPydrmkgAGNJ6dL4ZDEoejuDUt/R/UfEEQ8DG1vXS7vOG3w+TOJNshpzQVj4b25by4ZRpLnMj9JA03NQvV84DyzauWrVVJMlXPoqIsr9xdU3E3SyxqmM5t/7MeZV7psgkPjBI07UqEepFOL647dw/jdgcnZS1ObwjMAxmHChvHjMPUbIrb3DgXgnlK8FdtuWO8CsG9H/HV6JI9Abll2DrIMtYNOwaGoERAxZFutyk3jzSub7bYnlqSKXI8WbsLBnCl8eL8kt+mU8iOS+B/+LE9VkA2V1FM5Nl7XCuMygnb0C7Dnw7/0B3lBmCxIU/6IdckYudjYsKMsdQf6zoVBCgH2EA7e2NASEqfScprhpjy5wNXtRli8bl7xPIWCFflPDm7yaJXnIylAqjZ+eh2ZJgpAOvDAl7WMx12sxef2Eetlram/iQePdjE4rJuA8fqcrlMX1kh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CEcWypq5ZaQLdSIclAw/oo/zHINSe3HN+I7fjkQ3rGqaGhzSo3yBf4J48DfTlPj4b1nghZ6U5uQaqxWYS+l1SRuUBC+Sp5hGT9cA9Au4vD3ka6Mzk3Ys2s2A== 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: RFC v3: https://lore.kernel.org/lkml/20221218101901.373450-1-42.hyeyoo@gmail.com This series was originally part of "move PG_slab to page_type" series, but printk format implementation for page_type is separated to this series. RFC v3 -> v4: - dropped patch 1 ("mm/hwpoison: remove MF_MSG_SLAB from action_page_types") and patch 2 ("mm: move PG_slab flag to page_type") from previous spin as they are planned as separate series - adjusted comments from Andy Shevchenko [1] and Petr Mladek [2] - added patch 1 ("mmflags.h: use less error prone method to define pageflag_names") for consistency with patch 2 ("mm, printk: introduce new format %pGt for page_type"), as suggested by Andy Shevchenko [1] [1] https://lore.kernel.org/lkml/Y6AycLbpjVzXM5I9@smile.fi.intel.com/ [2] https://lore.kernel.org/lkml/Y6HSutM8pmoKxQWp@alley/ Based on mm-unstable (ede43f2956cc "kasan: fix Oops due to missing calls to kasan_arch_is_rea()") as there are recent changes in mmflags.h. Hyeonggon Yoo (3): mmflags.h: use less error prone method to define pageflag_names mm, printk: introduce new format %pGt for page_type mm/debug: use %pGt to display page_type in dump_page() Documentation/core-api/printk-formats.rst | 16 ++-- include/linux/page-flags.h | 7 +- include/trace/events/mmflags.h | 93 +++++++++++++---------- lib/test_printf.c | 26 +++++++ lib/vsprintf.c | 21 +++++ mm/debug.c | 7 ++ mm/internal.h | 1 + 7 files changed, 124 insertions(+), 47 deletions(-)