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 18A32C43334 for ; Thu, 7 Jul 2022 11:45:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8587A6B0073; Thu, 7 Jul 2022 07:45:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7E0566B0074; Thu, 7 Jul 2022 07:45:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6A8456B0075; Thu, 7 Jul 2022 07:45:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 581D46B0073 for ; Thu, 7 Jul 2022 07:45:33 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 2A0BC349B3 for ; Thu, 7 Jul 2022 11:45:33 +0000 (UTC) X-FDA: 79660123746.28.ABB0E11 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by imf09.hostedemail.com (Postfix) with ESMTP id 065F0140054 for ; Thu, 7 Jul 2022 11:45:29 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R381e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=32;SR=0;TI=SMTPD_---0VIcuH0b_1657194323; Received: from 30.97.48.62(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VIcuH0b_1657194323) by smtp.aliyun-inc.com; Thu, 07 Jul 2022 19:45:25 +0800 Message-ID: <12227412-1d79-4ff6-b4e6-0d438dac7359@linux.alibaba.com> Date: Thu, 7 Jul 2022 19:45:29 +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 3/3] mm: Add kernel PTE level pagetable pages account To: Matthew Wilcox Cc: akpm@linux-foundation.org, rppt@linux.ibm.com, 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: <398ead25695e530f766849be5edafaf62c1c864d.1657096412.git.baolin.wang@linux.alibaba.com> 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=1657194332; a=rsa-sha256; cv=none; b=YjLTJeafK8Aqaz9Y7iV6Txvc6ylCZDo3D6Il1qXz2/7xV+rw84CbrX7MQsWtifgYDg6bFi UArwHYSx4KPuCA7QDuEwFTVX9tM+GZN5/G62/3WhbKPLTDV5GIeoHHcO+GK3BX4nJAUeUn 7uY/v7D71Az2Nmy1LHbwlkBNxY28cMo= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf09.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.56 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=1657194332; 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=yxeuxt7DVwkZxe/dCaME9Z7Pg5u5iriNwip4TNU1pjc=; b=lFmpdPTniBKLcF2TPhgnCgu4imu2oRZH4u+ro06dtGUFFXXmwFkYBl8cC6GwYvuutVVEBF dGfTnehlhJKIqy8bfzNIOR2q+X3sQvXeZLm3rLVPDuYQavjW9dBsB4ra+k/Pk0+EBbZqCR h6cumUEwwVcO9FIoY77kDHaRAg3xuG8= X-Stat-Signature: c8wch46ij488nq1firtes3qu7dfnxw37 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 065F0140054 Authentication-Results: imf09.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf09.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.56 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com X-HE-Tag: 1657194329-512769 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:45 PM, Matthew Wilcox wrote: > On Wed, Jul 06, 2022 at 04:59:17PM +0800, Baolin Wang wrote: >> Now the kernel PTE level ptes are always protected by mm->page_table_lock >> instead of split pagetable lock, so the kernel PTE level pagetable pages >> are not accounted. Especially the vmalloc()/vmap() can consume lots of >> kernel pagetable, so to get an accurate pagetable accounting, calling new >> helpers page_{set,clear}_pgtable() when allocating or freeing a kernel >> PTE level pagetable page. >> >> Meanwhile converting architectures to use corresponding generic PTE pagetable >> allocation and freeing functions. >> >> Note this patch only adds accounting to the page tables allocated after boot. >> >> Signed-off-by: Baolin Wang >> Reported-by: kernel test robot > > What does this Reported-by: even mean? the kernel test robot told you > that the page tables weren't being accounted? I fixed an issue reported by this robot. OK, I can remove the tag. > I don't understand why we want to start accounting kernel page tables. > an we have a *discussion* about that with a sensible thread name instead > of just trying to sneak it in as patch 3/3? I think I have replied to you in below link [1]. The reason is we should keep consistent with PMD or PUD pagetable allocation. [1] https://lore.kernel.org/all/68a5286b-7ff3-2c4e-1ab2-305e7860a2f3@linux.alibaba.com/