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 CB08BC433EF for ; Sun, 3 Jul 2022 14:52:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4C1906B0073; Sun, 3 Jul 2022 10:52:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 44B246B0074; Sun, 3 Jul 2022 10:52:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2EAFE8E0001; Sun, 3 Jul 2022 10:52:56 -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 1B1096B0073 for ; Sun, 3 Jul 2022 10:52:56 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id E66D660AAF for ; Sun, 3 Jul 2022 14:52:55 +0000 (UTC) X-FDA: 79646080710.14.9E4F40F Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf26.hostedemail.com (Postfix) with ESMTP id 2C25B140006 for ; Sun, 3 Jul 2022 14:52:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wUvBQCKrc374bGTpdex4sW2Vzf0pP0Ed5hAguBT3ZdQ=; b=uX4wIiXMSzYxPjzsbR3395x39F RDKib5kzdS7y0dl/AgWgPI5fjMBREAcrr9JJoYZayb2iAia73uEhAqWU+9WVLRiNMY5gRM20TSKNB s+AiIBx+njGTY1MYVwc2K+IF/6wNjWCS0qv5gZlmUcJ1it+oaw28TEjh13ycIkUbI1KOzGSv4HSfH oOlo4hfWN6Yo/9eBUUwgS+wcbKikIcmC64WdEYcaV29HkkJTIZUkswzGRYq1+DLDVAKO33SJ80Dfa 5rtV0ps3Oi9KAAJ3NPx/x+BeJp22zYfr8q4J5o/HiBuYUXBd5j+timcGdRBxktw1xcIsrWD2xnFTK qmPqDpJg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o80xq-00GVRn-EG; Sun, 03 Jul 2022 14:52:46 +0000 Date: Sun, 3 Jul 2022 15:52:46 +0100 From: Matthew Wilcox To: Baolin Wang Cc: Mike Rapoport , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v3 2/3] mm: Add PUD level pagetable account Message-ID: References: <6a6a768634b9ce8537154264e35e6a66a79b6ca8.1656586863.git.baolin.wang@linux.alibaba.com> <1234a28a-dca0-5836-9066-4ab2d4fbcc95@linux.alibaba.com> <17df0d3c-caaf-ee34-f702-1d4e7674887f@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17df0d3c-caaf-ee34-f702-1d4e7674887f@linux.alibaba.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656859975; a=rsa-sha256; cv=none; b=WDGFEXMCT9Cyf4t+/bw9Kh9mfZnXNWqPY104I1my0b2RCMJuPCXenJpVONuGLgyyyJpnAE ySClE8chkifJaPCO/WZxrteIoDI0mqhtsb1aWvrCoH+aCzZnQIhQ98ap/yPXOVx9p0GAzy xunwW38G8PzGQURtclpWQGhssqYgB5U= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=uX4wIiXM; dmarc=none; spf=none (imf26.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656859975; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=wUvBQCKrc374bGTpdex4sW2Vzf0pP0Ed5hAguBT3ZdQ=; b=6Osyo88AXLvz/WbK5hjsd0A+vOgHTmZv1r/6nFNVysA72L7D+O3W2GwgMM4zUJqmujI1H9 OHiJg9Fy89Ltk4ZmEgwhtDQk2HogNPBmlr548OeIHZodnQubYts2X32ZZkI39/3QEn9zaZ IIpIvgK3dcxaVSiVmHOqmp7MrfQqfq4= Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=uX4wIiXM; dmarc=none; spf=none (imf26.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 2C25B140006 X-Stat-Signature: 68fhdksuzyc4wxnd996ae8u7ggu4fcx8 X-Rspam-User: X-HE-Tag: 1656859974-865014 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 Sun, Jul 03, 2022 at 10:06:32PM +0800, Baolin Wang wrote: > So for kernel pte page table allocation, I need another similar helpers like > below. However they do the samething with > pgtable_pud_page_ctor/pgtable_pud_page_dtor, so I am not sure this is good > for adding these duplicate code. Why do we want to account kernel PTE page tables in NR_PAGETABLE? I think that's confusing.