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 16FB0C433EF for ; Sun, 3 Jul 2022 03:47:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 79BCD6B0072; Sat, 2 Jul 2022 23:47:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 749D36B0073; Sat, 2 Jul 2022 23:47:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6381B6B0074; Sat, 2 Jul 2022 23:47:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 562736B0072 for ; Sat, 2 Jul 2022 23:47:15 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 199B42121D for ; Sun, 3 Jul 2022 03:47:15 +0000 (UTC) X-FDA: 79644403230.23.5ED851F Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf29.hostedemail.com (Postfix) with ESMTP id BDB3C12004C for ; Sun, 3 Jul 2022 03:47:14 +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=rucRFvpOsDc52A2QntChyESyfLe7Ora1LslugDlcseU=; b=ZRipj/oToh79hyhqe/Obn0YXtg Ori3VMGREiPDCg7n5Xs4NVzE/mKqUpLYI6S2/S8qs/HLwGA/cx8O1YS9Hgn1S0etp+3SHNF9SwB7i gX2C/2qv0xm1oMduNsmiC2/RzZ30eaP4z+o4//nzcdBo0aVOfaIzMY8t44ZwRdXcveb9unhea62Fc S0YNbtFUtC4ApLuEjRG/S0UDRgPZVpdkExPKrVdnwk/hALr/hvpJLxyLVsjtJbuCGy6SvnV+eqt+y cfTs8+oR4ykuREqyrf9xgFb0Qfz5k0+zrqXt70UZiAQuZ19uGgHCc/kNA9Dhuy+7Le1P6ulOuPjPe bCcNmssg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7qZf-00GDeQ-Ql; Sun, 03 Jul 2022 03:47:07 +0000 Date: Sun, 3 Jul 2022 04:47:07 +0100 From: Matthew Wilcox To: Baolin Wang Cc: akpm@linux-foundation.org, rppt@linux.ibm.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Huacai Chen , WANG Xuerui , loongarch@lists.linux.dev Subject: Re: [RFC PATCH v3 2/3] mm: Add PUD level pagetable account Message-ID: References: <6a6a768634b9ce8537154264e35e6a66a79b6ca8.1656586863.git.baolin.wang@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a6a768634b9ce8537154264e35e6a66a79b6ca8.1656586863.git.baolin.wang@linux.alibaba.com> ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="ZRipj/oT"; dmarc=none; spf=none (imf29.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656820034; a=rsa-sha256; cv=none; b=CxAbfrH2ahCI7sNIopCMxQVvP35l8/3B1QuBwYOug6+JUvYDr2yhpThLp9dquzEETzO4Nn Bjn0Gi4lHVwxdf6ELs0bFw5kvYziIz/IHC2RqSAMrVbibMO0HZDC/NcQOjc8cGnEoku1Dn BFHtxTrmkda8f+P165LVz2uqrRY6qWk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656820034; 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=rucRFvpOsDc52A2QntChyESyfLe7Ora1LslugDlcseU=; b=BJELw8TbUuHGhE9CWbei6OUjw90qsSduGIQkkNlZlj+m9X/szeZio+KBayDpCbDwMBlX1S Y7WGDMSmdoTbpPAI0bHi27bYTIKnfVpdnyRDjJy1q9FePN0jy6q4EEVS6UVMLEO+P/rwuT vLGY5Z0h18k7/om32+V5TyW97x4hxgo= X-Rspam-User: Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="ZRipj/oT"; dmarc=none; spf=none (imf29.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: rspam08 X-Rspamd-Queue-Id: BDB3C12004C X-Stat-Signature: 7ndwcyx3fncswp7bq7kjdh1b7z7j7zri X-HE-Tag: 1656820034-634429 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 Thu, Jun 30, 2022 at 07:11:15PM +0800, Baolin Wang wrote: > +++ b/arch/loongarch/include/asm/pgalloc.h > @@ -89,10 +89,15 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) > static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address) > { > pud_t *pud; > + struct page *page; > > - pud = (pud_t *) __get_free_pages(GFP_KERNEL, PUD_ORDER); > - if (pud) > - pud_init((unsigned long)pud, (unsigned long)invalid_pmd_table); > + page = alloc_pages(GFP_KERNEL, PUD_ORDER); Argh. I just got rid of PMD_ORDER from PA-RISC. Now Loongstupid has reintroduced it, and worse introduced PUD_ORDER. See commit 7bf82eb3873f.