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: 150823 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp243794vqb; Tue, 10 Oct 2023 07:29:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNaaKnNcN2mOa/MAMBTMLqRGTTKWNi47alb1iDNkM5RkChGNEU0lx2zDh9xdPeXnl/KwSx X-Received: by 2002:a05:6a20:1609:b0:153:7515:9919 with SMTP id l9-20020a056a20160900b0015375159919mr22309958pzj.21.1696948170541; Tue, 10 Oct 2023 07:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696948170; cv=none; d=google.com; s=arc-20160816; b=LyKhNplLg7nYP++QrdUt8rFIsmbkPWlH0RG3ULuYET7n/gtsd30CSlDMpNBrb9bbkK gskgU6MLHD7CkXOt/8pjD4btcn5VAM4KItwZTbuyqejjASCUd4bo3A2RJ/s7ne7+mhGM AnekMABZ4HC6YMIGTWE4Q83TtPlaZIDHnylxR8RJagLDKKD0M6d4xkIKbj9JXo9tdTok DwQi169ZPuzPsErSEavjLzanT9fQZBvSHz5EuMWVz/fOFV7c/nai08ahS+pW4vDcFJbD glAu7oCfipsZ2SH+38agtwSAWwN/ItdxjmNbS/lnxcYERgDkPvpTK4/BuXEaiaXDhTES dRQw== 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=R/QG0Z2F3QpUoVuiwm1cdKUqeM2tUh0VmscjJ0F6F+U=; fh=vd113QmVxKSP0xyTVgYADqM2Ffy1JHXPefyn38Zlb+8=; b=Lbzb32ZV9DhTvT/0Ksw8p+RdQWqMuBpLRY/E5arpWZJ/65+SblhnMSvEf/f1rZmQ6L Sk68IEPXnk/jg6Ny/3scL/F9CBICeJsqhsTerRl010lxt0GxToNLWl2DUIuP/Is5obOi u9+cGnkDAui3LI/fLLCMidOo0smRs4A0iw8aSsLPZPg98FF9qleBtA81DVt4d6mbEJIH XqgV6ea4fFkLqgpogzfSnrj8/rEEU93kDX7igusBVQ6Igj2BvOInw8+Y3OZhNoTU3dX6 2YoPLU+JZeVflca+L4xbQQq+viUznzCkYKK8PBb/uLLAz/+Jph6VTB7935Tj1ryT8Nnc 4rhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=MWezG50+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id y14-20020a056a00190e00b006910a45a23bsi10108478pfi.366.2023.10.10.07.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 07:29:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=MWezG50+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 7DD9C81C50A1; Tue, 10 Oct 2023 07:29:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233121AbjJJO3M (ORCPT + 20 others); Tue, 10 Oct 2023 10:29:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233684AbjJJO3I (ORCPT ); Tue, 10 Oct 2023 10:29:08 -0400 Received: from out-195.mta0.migadu.com (out-195.mta0.migadu.com [IPv6:2001:41d0:1004:224b::c3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70888A9 for ; Tue, 10 Oct 2023 07:29:06 -0700 (PDT) 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-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 10 Oct 2023 07:29:24 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779379124878476621 X-GMAIL-MSGID: 1779379124878476621 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; }