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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 657B9C433FE for ; Mon, 7 Dec 2020 09:43:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 0CA2C20809 for ; Mon, 7 Dec 2020 09:43:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CA2C20809 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.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=kAlthREMOil54Yaip3Bi5XRI1qh4kCoqtXVfm/D8CvI=; b=qENLH7UIvpKffG7bImFhZZTc2 d05e5B0S6HqMxia4XFWUC3j+I+tJiyanvbtIGG6Lxvel9q0GWbcdsur5yhxAklQRF7W13RkhFoKzd EKDyiq1Lo+xYpAUQIdLFaLNuTnoDasMGm8/ss/n27NhQdcUr3uZrhBL728g4iQ7htvIkH5Hi6NsTx /J5SM6PGS/P5XQUH929DH3eF6wl95diZMg1uyOEG6nZjhxxCUr4+gPGC1sUXFXx15clgX5uirqG5Y zlQBiHNqNElO/UDXs5MOEIhAorjSfnQuNLf2Nn2E9SMxoFqfS+PJQGutQ1TVilEA2c9HaivNaTSGk uuNUy7q9A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmD2a-0006vY-LV; Mon, 07 Dec 2020 09:42:44 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmD2W-0006uV-UJ for linux-arm-kernel@lists.infradead.org; Mon, 07 Dec 2020 09:42:42 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B79VqvC196429; Mon, 7 Dec 2020 04:42:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=mQGSCBXNc8nCe9NfCcbbUQy7sSkvGUcFQbqQDgycAUE=; b=l7NgRGBXLzvfS1gF4adM4aodiZgPbg3nra6vS5oc6Kub/IoLAA88b9e63sLTCAC1RJwm tupnt5EYt2ijgRtbnwH9neSmDCRvXCuXhomXTMMa5/L78VI1wEThFagvibfRIyXBXHN5 Bh/ulEAN3fXVMEdesOC+nq1i/7exgg9XPoiNT0VrLW6chRuDN9BiUq74sXTcOwJ5HBrg GkakJh7xTHUmXt8NeWt1osLbAyC2eGfsMiWx48X3cuRxWhUxDlJtEhY4SSx3AuG6vDoy 4kWLi2XvbOkJpOW4pXF+bBZmPu9L5x8seT2Z3OSh8i/Gpy5P7o3A0TjnOV3mmAro7UvO ig== Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 359hhsrytb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Dec 2020 04:42:23 -0500 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0B79SZgC012085; Mon, 7 Dec 2020 09:42:21 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma04ams.nl.ibm.com with ESMTP id 3583svj870-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Dec 2020 09:42:21 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0B79gJBZ48234816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Dec 2020 09:42:19 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 23DA0AE051; Mon, 7 Dec 2020 09:42:19 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AB976AE056; Mon, 7 Dec 2020 09:42:17 +0000 (GMT) Received: from linux.ibm.com (unknown [9.145.50.18]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 7 Dec 2020 09:42:17 +0000 (GMT) Date: Mon, 7 Dec 2020 11:42:15 +0200 From: Mike Rapoport To: Marc Zyngier Subject: Re: [PATCH] arm64: mm: decrease the section size to reduce the memory reserved for the page map Message-ID: <20201207094215.GC1112728@linux.ibm.com> References: <20201204014443.43329-1-liwei213@huawei.com> <20201204111347.GA844@willie-the-truck> <390f5f441d99a832f4b2425b46f6d971@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <390f5f441d99a832f4b2425b46f6d971@kernel.org> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-12-07_08:2020-12-04, 2020-12-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=5 spamscore=0 clxscore=1011 adultscore=0 lowpriorityscore=0 mlxscore=0 mlxlogscore=974 bulkscore=0 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012070058 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201207_044241_314339_0872B0F6 X-CRM114-Status: GOOD ( 34.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Barry Song , Linux ARM , Steve Capper , Catalin Marinas , Linux Kernel Mailing List , Wei Li , butao@hisilicon.com, Will Deacon , Ard Biesheuvel , Nicolas Saenz Julienne , fengbaopeng2@hisilicon.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 07, 2020 at 09:35:06AM +0000, Marc Zyngier wrote: > On 2020-12-07 09:09, Ard Biesheuvel wrote: > > (+ Marc) > > > > On Fri, 4 Dec 2020 at 12:14, Will Deacon wrote: > > > > > > On Fri, Dec 04, 2020 at 09:44:43AM +0800, Wei Li wrote: > > > > For the memory hole, sparse memory model that define SPARSEMEM_VMEMMAP > > > > do not free the reserved memory for the page map, decrease the section > > > > size can reduce the waste of reserved memory. > > > > > > > > Signed-off-by: Wei Li > > > > Signed-off-by: Baopeng Feng > > > > Signed-off-by: Xia Qing > > > > --- > > > > arch/arm64/include/asm/sparsemem.h | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/arch/arm64/include/asm/sparsemem.h b/arch/arm64/include/asm/sparsemem.h > > > > index 1f43fcc79738..8963bd3def28 100644 > > > > --- a/arch/arm64/include/asm/sparsemem.h > > > > +++ b/arch/arm64/include/asm/sparsemem.h > > > > @@ -7,7 +7,7 @@ > > > > > > > > #ifdef CONFIG_SPARSEMEM > > > > #define MAX_PHYSMEM_BITS CONFIG_ARM64_PA_BITS > > > > -#define SECTION_SIZE_BITS 30 > > > > +#define SECTION_SIZE_BITS 27 > > > > > > We chose '30' to avoid running out of bits in the page flags. What > > > changed? > > > > > > With this patch, I can trigger: > > > > > > ./include/linux/mmzone.h:1170:2: error: Allocator MAX_ORDER exceeds > > > SECTION_SIZE > > > #error Allocator MAX_ORDER exceeds SECTION_SIZE > > > > > > if I bump up NR_CPUS and NODES_SHIFT. > > > > > > > Does this mean we will run into problems with the GICv3 ITS LPI tables > > again if we are forced to reduce MAX_ORDER to fit inside > > SECTION_SIZE_BITS? > > Most probably. We are already massively constraint on platforms > such as TX1, and dividing the max allocatable range by 8 isn't > going to make it work any better... I don't think MAX_ORDER should shrink. Even if SECTION_SIZE_BITS is reduced it should accomodate the existing MAX_ORDER. My two pennies. > M. > -- > Jazz is not dead. It just smells funny... -- Sincerely yours, Mike. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel