From patchwork Mon Sep 28 17:54:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 11804461 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1AEED6CA for ; Mon, 28 Sep 2020 17:55:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CC3C821941 for ; Mon, 28 Sep 2020 17:55:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sent.com header.i=@sent.com header.b="aGKrAuFE"; dkim=temperror (0-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Rmjfm5wt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC3C821941 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=sent.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 72093900009; Mon, 28 Sep 2020 13:55:26 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0298590000A; Mon, 28 Sep 2020 13:55:25 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B6EFF90000C; Mon, 28 Sep 2020 13:55:25 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0076.hostedemail.com [216.40.44.76]) by kanga.kvack.org (Postfix) with ESMTP id 8CB6B90000A for ; Mon, 28 Sep 2020 13:55:25 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 50C26181AE86E for ; Mon, 28 Sep 2020 17:55:25 +0000 (UTC) X-FDA: 77313222210.23.soap13_19150d427183 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 2CA033760C for ; Mon, 28 Sep 2020 17:55:25 +0000 (UTC) X-Spam-Summary: 1,0,0,99905234cc23bc4f,d41d8cd98f00b204,zi.yan@sent.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1261:1311:1314:1345:1359:1437:1515:1535:1541:1711:1730:1747:1777:1792:1801:2198:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3867:3871:4321:4605:5007:6120:6261:6653:6742:7576:7901:10004:11026:11473:11658:11914:12043:12296:12438:12555:12679:12895:13069:13311:13357:13894:14096:14181:14384:14581:14721:21080:21451:21627:30054:30064,0,RBL:64.147.123.17:@sent.com:.lbl8.mailshell.net-62.18.0.100 64.100.201.100;04yfpe11xnzkyp86ffkcd6n1pw4zgopiwmtwxrddcr1r31rxxg1zasi7qk9jupd.f77hdonsgcu5nigfdmm8s63u9ddjceayuwppbcwr4odn8r4gbqyxi6goye9t96s.s-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: soap13_19150d427183 X-Filterd-Recvd-Size: 5156 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Mon, 28 Sep 2020 17:55:24 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 5B2A9E3B; Mon, 28 Sep 2020 13:55:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 28 Sep 2020 13:55:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sent.com; h=from :to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; s=fm1; bh=yT8BqugvTfzX9 L+ABEmA5mKWIFrSrhshFc+djKx/V3o=; b=aGKrAuFETfvFo4s3uBM7F78Ud8X7/ xkgCTUDMcd/tBhOn3y4M2odiBIVc+w0gnHamHUE7/pmQCVRkxwQx0xrVBRtaZFSd SYRu78pFlEIy59DpizHiI/ivIx3zR3piW2nuHavWVXcoYOVIdmQgK/Fmh9VVVmbW 3MN3fZoFbfvsr5Nh0T9nbx4IXc1gG2tOqBE1gVDZ1uUPZfpjKaZ5/1ulENnYq1Eh gREN3MAcLIOcUF12c0W4q2AV3JlCAp2GOFR6jnZ93A1ySOmn3TwNqu8YYReHLl81 MGdfCTyDMdZZbXPvbaxiIsfWkU8cEdU5NOePBq35hzjKsTq7vp8JoIj+w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:reply-to:subject :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=yT8BqugvTfzX9L+ABEmA5mKWIFrSrhshFc+djKx/V3o=; b=Rmjfm5wt kVGtJQ24G9TjUoQR/Oq6OBke3QE1yzYEVXda6XuNBCCNyrwr1Z/QesQKOVxm7rtA w7N4pMnJ4YrYKof4L2avf4X5X98uJvIwC/s/3Fcp3+G9VsLBqchhS34/yOTSSnD0 L4sh0vaaX6xtYxfygSZLi3eAt9ic1OSPm61gTGYFWiAS41OrvgZ5jvL5qaLeX7Y7 NWB7sKeYl2yQy0Rn3oc0KiQ077MKSQ7dkYF7taEkgXidwU3Gz8pxMMissx/1nfKo AhyiUFAckTiYQER28ehsjj87Z9i4OtqcsEFPE1eYaotoVe44AWBd34ttZS6qKAtN rtbFpVqoHU9tgw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdeigdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhhrggfgsedtkeertdertddtnecuhfhrohhmpegkihcujggr nhcuoeiiihdrhigrnhesshgvnhhtrdgtohhmqeenucggtffrrghtthgvrhhnpeduhfffve ektdduhfdutdfgtdekkedvhfetuedufedtgffgvdevleehheevjefgtdenucfkphepuddv rdegiedruddtiedrudeigeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpeiiihdrhigrnhesshgvnhhtrdgtohhm X-ME-Proxy: Received: from nvrsysarch6.NVidia.COM (unknown [12.46.106.164]) by mail.messagingengine.com (Postfix) with ESMTPA id 763C8306468B; Mon, 28 Sep 2020 13:55:21 -0400 (EDT) From: Zi Yan To: linux-mm@kvack.org Cc: "Kirill A . Shutemov" , Roman Gushchin , Rik van Riel , Matthew Wilcox , Shakeel Butt , Yang Shi , Jason Gunthorpe , Mike Kravetz , Michal Hocko , David Hildenbrand , William Kucharski , Andrea Arcangeli , John Hubbard , David Nellans , linux-kernel@vger.kernel.org, Zi Yan Subject: [RFC PATCH v2 10/30] fs: proc: add PUD THP kpageflag. Date: Mon, 28 Sep 2020 13:54:08 -0400 Message-Id: <20200928175428.4110504-11-zi.yan@sent.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200928175428.4110504-1-zi.yan@sent.com> References: <20200928175428.4110504-1-zi.yan@sent.com> Reply-To: Zi Yan MIME-Version: 1.0 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: Zi Yan Bit 27 is used to identify PUD THP. Signed-off-by: Zi Yan --- fs/proc/page.c | 2 ++ include/uapi/linux/kernel-page-flags.h | 1 + 2 files changed, 3 insertions(+) diff --git a/fs/proc/page.c b/fs/proc/page.c index f3b39a7d2bf3..e4e2ad3612c9 100644 --- a/fs/proc/page.c +++ b/fs/proc/page.c @@ -161,6 +161,8 @@ u64 stable_page_flags(struct page *page) u |= BIT_ULL(KPF_ZERO_PAGE); u |= BIT_ULL(KPF_THP); } + if (compound_order(head) == HPAGE_PUD_ORDER) + u |= 1 << KPF_PUD_THP; } else if (is_zero_pfn(page_to_pfn(page))) u |= BIT_ULL(KPF_ZERO_PAGE); diff --git a/include/uapi/linux/kernel-page-flags.h b/include/uapi/linux/kernel-page-flags.h index 6f2f2720f3ac..62c5fc70909b 100644 --- a/include/uapi/linux/kernel-page-flags.h +++ b/include/uapi/linux/kernel-page-flags.h @@ -36,5 +36,6 @@ #define KPF_ZERO_PAGE 24 #define KPF_IDLE 25 #define KPF_PGTABLE 26 +#define KPF_PUD_THP 27 #endif /* _UAPILINUX_KERNEL_PAGE_FLAGS_H */