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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA339C4360F for ; Wed, 20 Feb 2019 01:34:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A7D921738 for ; Wed, 20 Feb 2019 01:34:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DyXJc+ma" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A7D921738 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Oaqb4AxBofRtsWM5/w7s9+ri9TKonSs/MCNH6dGuFdI=; b=DyXJc+maET2rNx 8SOC8Nj7Zs++9MgG5RYY0D3hFYVNx3x/rdTd+519ifZLJWyT+eQjKQIxfOrO803+vvqxFncWI4iHF oR8tIietnROBiHE4m78n/EYIWmNA8qwgkmz90hV3lBdQu5UFLFB+DKcA3iCqO8+dXoSSURv85vy+/ BkqOpHM/4bb8k1bJabcF32an2mzJor1MhgIvfn43J3wVqoqxznE2BkA0tAJ7J+obEe9IW6/7UWKE4 GuLOSSkzaqrQa6+JnnFY/ep3WQEoDC05RLtZB7ouMOXhh6Y4aWqFHj1xos0bv94NIJUKGp+t3/okH DWJiCkDGXrxjkPn3lFKQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwGm2-000492-7h; Wed, 20 Feb 2019 01:34:10 +0000 Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwGlz-00048r-IW; Wed, 20 Feb 2019 01:34:07 +0000 Date: Tue, 19 Feb 2019 17:34:07 -0800 From: Matthew Wilcox To: Anshuman Khandual Subject: Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables Message-ID: <20190220013407.GD12668@bombadil.infradead.org> References: <20190214211642.2200-1-yuzhao@google.com> <20190218231319.178224-1-yuzhao@google.com> <863acc9a-53fb-86ad-4521-828ee8d9c222@arm.com> <20190219053205.GA124985@google.com> <8f9b0bfb-b787-fa3e-7322-73a56a618aa8@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8f9b0bfb-b787-fa3e-7322-73a56a618aa8@arm.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-arch@vger.kernel.org, Yu Zhao , Ard Biesheuvel , Peter Zijlstra , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Nick Piggin , Jun Yao , linux-mm@kvack.org, "Aneesh Kumar K . V" , Chintan Pandya , Joel Fernandes , "Kirill A . Shutemov" , Andrew Morton , Laura Abbott , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Feb 19, 2019 at 11:47:12AM +0530, Anshuman Khandual wrote: > + Matthew Wilcox > On 02/19/2019 11:02 AM, Yu Zhao wrote: > > On Tue, Feb 19, 2019 at 09:51:01AM +0530, Anshuman Khandual wrote: > >> > >> > >> On 02/19/2019 04:43 AM, Yu Zhao wrote: > >>> For pte page, use pgtable_page_ctor(); for pmd page, use > >>> pgtable_pmd_page_ctor() if not folded; and for the rest (pud, > >>> p4d and pgd), don't use any. > >> pgtable_page_ctor()/dtor() is not optional for any level page table page > >> as it determines the struct page state and zone statistics. > > > > This is not true. pgtable_page_ctor() is only meant for user pte > > page. The name isn't perfect (we named it this way before we had > > split pmd page table lock, and never bothered to change it). > > > > The commit cccd843f54be ("mm: mark pages in use for page tables") Where did you get that commit ID from? In Linus' tree, it's 1d40a5ea01d53251c23c7be541d3f4a656cfc537 > > clearly states so: > > Note that only pages currently accounted as NR_PAGETABLES are > > tracked as PageTable; this does not include pgd/p4d/pud/pmd pages. > > I think the commit is the following one and it does say so. But what is > the rationale of tagging only PTE page as PageTable and updating the zone > stat but not doing so for higher level page table pages ? Are not they > used as page table pages ? Should not they count towards NR_PAGETABLE ? > > 1d40a5ea01d53251c ("mm: mark pages in use for page tables") I think they should all be accounted towards NR_PAGETABLE and marked as being PageTable. Somebody needs to make the case for that and send the patches. That patch even says that there should be follow-up patches to do that. I've been a little busy and haven't got back to it. I thought you said you were going to do it. > pgtable_page_ctor/dtor() use across arch is not consistent and there is a need > for generalization which has been already acknowledged earlier. But for now we > can atleast fix this on arm64. > > https://lore.kernel.org/lkml/1547619692-7946-1-git-send-email-anshuman.khandual@arm.com/ ... were you not listening when you were told that was completely inadequate? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel