From patchwork Tue Oct 10 14:28:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 13415666 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 C0882CD8C8B for ; Tue, 10 Oct 2023 14:30:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6578B8D00BC; Tue, 10 Oct 2023 10:30:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E07B8D0002; Tue, 10 Oct 2023 10:30:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4CF718D00BC; Tue, 10 Oct 2023 10:30:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 390B88D0002 for ; Tue, 10 Oct 2023 10:30:55 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 10FFE802AF for ; Tue, 10 Oct 2023 14:30:54 +0000 (UTC) X-FDA: 81329788428.12.1D168E6 Received: from out-204.mta0.migadu.com (out-204.mta0.migadu.com [91.218.175.204]) by imf06.hostedemail.com (Postfix) with ESMTP id C6D751802ED for ; Tue, 10 Oct 2023 14:29:06 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=MWezG50+; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf06.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 91.218.175.204 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696948147; 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=R/QG0Z2F3QpUoVuiwm1cdKUqeM2tUh0VmscjJ0F6F+U=; b=EtYXsOS6XlzOzKzDgWvpoLDHBQlfOu+NsO+sZozDIZKKfY1h0rkBxLHkWbVlEfvBT6b1/3 0o37qXTuXQIQ82kC3aNAyQLbg4Rs9HXrQZCaCfJRJylxP9mEwNO9rlmwsgio51n4l35cn+ JuL7UllOhc7Bowazsl/0KobWck65wlg= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=MWezG50+; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf06.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 91.218.175.204 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696948147; a=rsa-sha256; cv=none; b=Kxx1eS+r7Oycn8YjPZ7KZNu6sNgfDCNjBzcqbOPjVJ5ZtsbEbSrplaln+i/5VJq5KcL3pD I8bVoDG7hqcy7yqnGwi2kNQoHt4Cda6q7ZAskfeztGiZ5xl0EePER588mIA40mwoll/OJx CFoHQ+rCCvGRxuVeJa4R2LzNUNUUVNo= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1696948144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R/QG0Z2F3QpUoVuiwm1cdKUqeM2tUh0VmscjJ0F6F+U=; b=MWezG50+O7UF+lm6gT/NNY5RH7a9ZopHj6n/EIkn62Z4LPC8w5SNIXi0a8Rgj52GVjSvYo 3EvJzzjr7YfdBb0crTZGG+Hndwx69pJFC8xJobtbDgC16FB0JY6EgocjAcpWMzR122rcVV 9pbMUMojnK8Du56fogifM1zDVCrzEt8= From: Naoya Horiguchi To: linux-mm@kvack.org Cc: Andrew Morton , Matthew Wilcox , David Hildenbrand , "Kirill A. Shutemov" , Mike Kravetz , Miaohe Lin , Vlastimil Babka , Muchun Song , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: [PATCH v1 5/5] tools/mm/page-types.c: hide compound pages in non-raw mode Date: Tue, 10 Oct 2023 23:28:01 +0900 Message-Id: <20231010142801.3780917-6-naoya.horiguchi@linux.dev> In-Reply-To: <20231010142801.3780917-1-naoya.horiguchi@linux.dev> References: <20231010142801.3780917-1-naoya.horiguchi@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: C6D751802ED X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: zku1rgraedtothh71fyxfkfihuyddho8 X-HE-Tag: 1696948146-907739 X-HE-Meta: U2FsdGVkX1+s9tshtMTBj8U+d9YobIP1N1oaX1+h0aEEfZPK8auuX+L0X4+AfjkzuWDKmaDrXKana228FnKlCqdFoiUZoKLfgqmEgTKmSx/Vo1ApNyVjK44RNZThmoE+vd4pMZGpBCWnvDFI3tlNB+FUCXLzOYZP23NhT3CSVKM9Rjn1+gTyVWI/cPyE9tj7bAeRdnFZsQWuQ0LK5qNx5jBvaJzLAx+UuuU+E8yrFbsVmu0PPpzg6ealPyu1pvTkflnuenXXhAW6s9Ax6vgn7oSieCAVI6Okfc0Cg5tu97oMHls13DFgrmUlK0DAevTcDR1jLEs3WE/RyCx3z5Ls3OY+E6xPOYouG3mmyjZyVCImlyxYrJnGbXhK22QM/oYmbQUDQvGb/E5vGmNLRdIiMUo11/x8ZqbWdp29AxrtNWwO4W9En4SZ1RFM8v3xbb87aLU3LOhgf3di4PKMdqV5bQG7vXK3fqhlSHUQ/y8hPmzTqf3Xi4Xp9b4+at+sZ/22uWQMNKcVoG3yQ5N2Aqycgr+v9yu3Qz3vz7Jexm5xCPbCCQqHgbZho78MdWIfyXruTH3O07sJoCMIEz9KYL8apdZKEeJ8TkMlOMRl8FCLHvG8kSYnOh5lWTHmCLBzYAEG8kYDrNI6Qmr3FITf2NimwG5/Mzy6u+ne27a4UGujyacMi2ufeOCdk3LFkfIg0xKr5LCya91kK6AQvXUfTYWAmtxXLztF6g721GBsnrbzndjIElTO/4j1vSUoTJhILksNUeogheZ/evyOFITaCBSt7x6k7Y+NOwEeT3j+zPLcXB+QqklEQYBRU8g5kTBzTtX38JZ+QJw/II0Le53g2sBqIWyvuQTMouuTGmXDnZOlsfPv3akTkao4x7hBl1Q0oSJLgOpKUA4gIYg8AFeW6mTKSAAF6tG5h8xdzqjwzEggcLCRkHYtHPj9QjapA2kRrG9ICgoaZC7wC698rLbyJXV jxSrE8jR WlCJqHKATgnyDJwxElIXhe/7PlYCDRqeObZM+tRF2SxDgq/sn4UbVsuzOF9ok008pY+eRQJqBM+sRPZTZ1taweipXJUH7gmqhHkL8 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: From: Naoya Horiguchi In non-raw mode (i.e. calling page-types without -r flag), any flags for compound pages except for hugetlb are supposed to be hidden. But currently KPF_THP is shown and the newly added flag KPF_FOLIO is also shown, which is unexpected. So hide them. Signed-off-by: Naoya Horiguchi --- tools/mm/page-types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mm/page-types.c b/tools/mm/page-types.c index b78448d19e88..c37e1e79bc61 100644 --- a/tools/mm/page-types.c +++ b/tools/mm/page-types.c @@ -508,7 +508,7 @@ static uint64_t well_known_flags(uint64_t flags) /* hide non-hugeTLB compound pages */ if ((flags & BITS_COMPOUND) && !(flags & BIT(HUGE))) - flags &= ~BITS_COMPOUND; + flags &= ~(BITS_COMPOUND|BIT(THP)|BIT(FOLIO)); return flags; }