Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2264840pxu; Mon, 7 Dec 2020 01:46:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZarTwf8Tcf5uCRvG0cl9LW9SG8fxTNC4f0OrIGW/Va7QFdo9cs7mNh7QVHdsg/TAgIBNK X-Received: by 2002:a05:6402:44b:: with SMTP id p11mr19158198edw.164.1607334394271; Mon, 07 Dec 2020 01:46:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607334394; cv=none; d=google.com; s=arc-20160816; b=p53EVzFfWnvJfDI1HmH5/wavZXMZ69wK+rKW4ZoA39OSsVmokzj9cc723J8nIwD/oQ Vh5U1uChKBQV4/23alidlA9Pj+LI8wmEheHRmbuQmdSmo/8ABe2pclblL2TcF14ohx19 nwhV55tloxqHAwAAXUwGkX+sQUh4qDuFjxKKeYLktekmO3t3ypyCN4EIzogQMmjfW5av wPLdT3yV7HkDfSexy1h79h4Rxpv9HPih513+2VT1Bk9kwJXr9W4q81SnFbeQiW9snR1L aXy6vU4egVuk5TnxdIdBv7cIMG+pld7rMdLr9qBcpk3742BElbSC09C6aAQUMgL38qyZ Dnkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mQGSCBXNc8nCe9NfCcbbUQy7sSkvGUcFQbqQDgycAUE=; b=fzONbYPWpsfy1f/9WUiH7GA/j9FhjWyh3DVDLSV2M5BMmltM9LlYEqPuOT+hCCRFIa ExjPCCJAg6kWCFHUc6lSiAecvX9eiDpFcQqtIA7UxamQygUrR+67Fod/y8NpShVeulL9 VvYrBzr6bpKmTN9VUzvSDVFVQirQphVgkjKmHBOtFF0gzlA/n970PCdCEVBnvla2fHNI nXPeYZS34mHDjVNHhY+luun/tm0rBU/yEpxRJ5258ggAwUsKLB7DBWybimY/PEGYyZ0Z OIui6FvZT2kVuxScMjH88frY91F1t3k9Hf4WPP+wn0EztO48Cvw5Y+FL0jmIMIxEb2BJ Jvmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=l7NgRGBX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si3117902eds.239.2020.12.07.01.46.12; Mon, 07 Dec 2020 01:46:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=l7NgRGBX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726396AbgLGJnZ (ORCPT + 99 others); Mon, 7 Dec 2020 04:43:25 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:13416 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbgLGJnZ (ORCPT ); Mon, 7 Dec 2020 04:43:25 -0500 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 Cc: Ard Biesheuvel , Will Deacon , Wei Li , Barry Song , Steve Capper , Catalin Marinas , Linux Kernel Mailing List , fengbaopeng2@hisilicon.com, butao@hisilicon.com, Nicolas Saenz Julienne , Linux ARM 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-Type: text/plain; charset=us-ascii 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.