From patchwork Wed Sep 2 18:06:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 11751477 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 CF85B722 for ; Wed, 2 Sep 2020 18:06:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 922892083B for ; Wed, 2 Sep 2020 18:06:37 +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="S1ka07XL"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="vOM8SLwb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 922892083B 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 1877C900015; Wed, 2 Sep 2020 14:06:34 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 110EA90000F; Wed, 2 Sep 2020 14:06:33 -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 CD07E900016; Wed, 2 Sep 2020 14:06:33 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0208.hostedemail.com [216.40.44.208]) by kanga.kvack.org (Postfix) with ESMTP id 9EB68900012 for ; Wed, 2 Sep 2020 14:06:33 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5D2C3824805A for ; Wed, 2 Sep 2020 18:06:33 +0000 (UTC) X-FDA: 77218901466.14.drain90_240267a270a2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 2FFBD18229835 for ; Wed, 2 Sep 2020 18:06:33 +0000 (UTC) X-Spam-Summary: 1,0,0,31522e895ed40085,d41d8cd98f00b204,zi.yan@sent.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1261:1311:1314:1345:1359:1437:1515:1534: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:6630:6653: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:66.111.4.25:@sent.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04y8zjfqtmdmhtzuojmoijyy9xn9sypiwmtwxrddx1d7kmfydy1zasi7qk9kmfj.hud8gt1sgcu5nigfpq3crrixcddjceayuwp97sn84guzur4gbqyxi6goye9t96s.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:27,LUA_SUMMARY:none X-HE-Tag: drain90_240267a270a2 X-Filterd-Recvd-Size: 4876 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Wed, 2 Sep 2020 18:06:32 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 45A6A5C0150; Wed, 2 Sep 2020 14:06:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 02 Sep 2020 14:06:32 -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=BMorf3eXecNKl H7Og7d/a2LFgjFUH2s538ZL40vPoMM=; b=S1ka07XLcVy/MEwyYQQLdq5MMrvIN BVYTs5kA1XKydBgD2prQYhC1XuYcqKuRwdpwxsoVZrMrzc53vwZ/VbdMAmqud4e7 kcnpPpJ8dMaXpFQKb+A4iUvq1ZL+MmQJuKKY2IutfabDsDVU5YwAimNJrOx2BHip c9mzFK/v58rZKkga3x6/Rz+EW70taXa1N1LeiuDgAhHbGP6n0SqAmHiSKr70x/IG XBOZFT6UteDCDRGVB7glRFjp+fDSy4OqaV0UVhXtX0LtlwvPLxNHNClY54xMyhvK tHjq7cMNJaBA8YBeEr4uLXbvFcb+QjrmHRUSlx1DZu51dvO7ypr/HQHvA== 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=BMorf3eXecNKlH7Og7d/a2LFgjFUH2s538ZL40vPoMM=; b=vOM8SLwb 2XsKEmgyTZDsilXBWFEx1lOB7+OIn7JslP62C+9Kph3REvyh3/GFAEAyVXq2/QZE AQ3H/bf7YjdsHmRDiGCPUOHmp2OHVZL+y7PJspOe9tMOBIxhtZX1rWyvvWibKj/g T21vTpO43QPP76Cc2T53VZygIY5GgBCzQaYVfqZhCSNxP5QQuDsBC7e4Gq0+OHN2 lBYfdxh8cl+PoqgszrYsm866A6F14rodJKPT1elM9ArxIR90Z1s0HG9UabNDNdxQ xLycRN8KL5gBOD/KvLcNMmLFZoSAkpZ5AYHJSQAp6CgbdRpUXG+XSJDBAeyd3Vfv MVFjRKKObf3SCQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudefledguddvudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhhrggfgsedtkeertdertddtnecuhfhrohhmpegkihcu jggrnhcuoeiiihdrhigrnhesshgvnhhtrdgtohhmqeenucggtffrrghtthgvrhhnpeduhf ffveektdduhfdutdfgtdekkedvhfetuedufedtgffgvdevleehheevjefgtdenucfkphep uddvrdegiedruddtiedrudeigeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpeiiihdrhigrnhesshgvnhhtrdgtohhm X-ME-Proxy: Received: from nvrsysarch6.NVidia.COM (unknown [12.46.106.164]) by mail.messagingengine.com (Postfix) with ESMTPA id 6E1A43060272; Wed, 2 Sep 2020 14:06:31 -0400 (EDT) From: Zi Yan To: linux-mm@kvack.org, Roman Gushchin Cc: Rik van Riel , "Kirill A . Shutemov" , Matthew Wilcox , Shakeel Butt , Yang Shi , David Nellans , linux-kernel@vger.kernel.org, Zi Yan Subject: [RFC PATCH 03/16] mm: proc: add 1GB THP kpageflag. Date: Wed, 2 Sep 2020 14:06:15 -0400 Message-Id: <20200902180628.4052244-4-zi.yan@sent.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200902180628.4052244-1-zi.yan@sent.com> References: <20200902180628.4052244-1-zi.yan@sent.com> Reply-To: Zi Yan MIME-Version: 1.0 X-Rspamd-Queue-Id: 2FFBD18229835 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 1GB THP. Signed-off-by: Zi Yan --- fs/proc/page.c | 2 ++ include/uapi/linux/kernel-page-flags.h | 2 ++ 2 files changed, 4 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..cdeb33ab655c 100644 --- a/include/uapi/linux/kernel-page-flags.h +++ b/include/uapi/linux/kernel-page-flags.h @@ -36,5 +36,7 @@ #define KPF_ZERO_PAGE 24 #define KPF_IDLE 25 #define KPF_PGTABLE 26 +#define KPF_PUD_THP 27 + #endif /* _UAPILINUX_KERNEL_PAGE_FLAGS_H */