From mboxrd@z Thu Jan 1 00:00:00 1970 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 62CB5C43334 for ; Thu, 7 Jul 2022 11:32:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8060C6B0072; Thu, 7 Jul 2022 07:32:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 78F8B6B0073; Thu, 7 Jul 2022 07:32:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 62DEB6B0074; Thu, 7 Jul 2022 07:32:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 50C196B0072 for ; Thu, 7 Jul 2022 07:32:50 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 20C49120E22 for ; Thu, 7 Jul 2022 11:32:50 +0000 (UTC) X-FDA: 79660091700.14.FBF4EA3 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by imf24.hostedemail.com (Postfix) with ESMTP id 71E4B18005F for ; Thu, 7 Jul 2022 11:32:46 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=33;SR=0;TI=SMTPD_---0VIdIQWG_1657193558; Received: from 30.97.48.62(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VIdIQWG_1657193558) by smtp.aliyun-inc.com; Thu, 07 Jul 2022 19:32:40 +0800 Message-ID: Date: Thu, 7 Jul 2022 19:32:44 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 0/3] Add PUD and kernel PTE level pagetable account To: Dave Hansen , akpm@linux-foundation.org Cc: rppt@linux.ibm.com, willy@infradead.org, will@kernel.org, aneesh.kumar@linux.ibm.com, npiggin@gmail.com, peterz@infradead.org, catalin.marinas@arm.com, chenhuacai@kernel.org, kernel@xen0n.name, tsbogend@alpha.franken.de, dave.hansen@linux.intel.com, luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, arnd@arndb.de, guoren@kernel.org, monstr@monstr.eu, jonas@southpole.se, stefan.kristiansson@saunalahti.fi, shorne@gmail.com, x86@kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linux-csky@vger.kernel.org, openrisc@lists.librecores.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: From: Baolin Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657193569; a=rsa-sha256; cv=none; b=vHo6852U7F7UdyQICEpQWNYdFb56y8sDJNeInC/1wM5qUp26/Lpx5wL8wFSYba/MOxLNnM oY1jAJofdxnv/iEUPQyru/0guz1m9NIQqcRhkwPVOFVyl4HktSq9nA9xREIoDpHGUUMYpt frFTw5oz5xku0I6aqPv1GbxrNEfu2nc= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf24.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.130 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657193569; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q5g8u297hzMJllDMxsXrcGbqPqnSZ5Rw5Sn07mKeuHg=; b=Gv/2KCOJiyCsR3Ccxrpb8jMuKb7vwAKDnTZcVNqZDPFC430x05zbtMu0HKRTBeB8pq9ubW w1bpEn9/0PfLGy3EXGvDjg/mCSHG6qwn9FN7E010mEts4hFWQPnT5Uxz34h5eSKtOwCHc7 m0z3ahlwrS5ygBmCEL8UynZV7NPQ6Yw= X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 71E4B18005F X-Rspam-User: Authentication-Results: imf24.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf24.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.130 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com X-Stat-Signature: qhczfnhdb86swegschha1ydg6446wye5 X-HE-Tag: 1657193566-341993 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: On 7/6/2022 11:48 PM, Dave Hansen wrote: > On 7/6/22 01:59, Baolin Wang wrote: >> Now we will miss to account the PUD level pagetable and kernel PTE level >> pagetable, as well as missing to set the PG_table flags for these pagetable >> pages, which will get an inaccurate pagetable accounting, and miss >> PageTable() validation in some cases. So this patch set introduces new >> helpers to help to account PUD and kernel PTE pagetable pages. > > Could you explain the motivation for this series a bit more? Is there a > real-world problem that this fixes? Not fix real problem. The motivation is that making the pagetable accounting more accurate, which helps us to analyse the consumption of the pagetable pages in some cases, and maybe help to do some empty pagetable reclaiming in future.