From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422981AbcFMMgY (ORCPT ); Mon, 13 Jun 2016 08:36:24 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:14346 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161134AbcFMMgX (ORCPT ); Mon, 13 Jun 2016 08:36:23 -0400 From: Jisheng Zhang To: , CC: , , Jisheng Zhang Subject: [PATCH] arm64: mm: update SECTION_SIZE_BITS to 27 for 4k pagesize Date: Mon, 13 Jun 2016 20:31:59 +0800 Message-ID: <1465821119-3384-1-git-send-email-jszhang@marvell.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-06-13_06:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606130141 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On one of my platforms, linux is given 1152MB memory. With current SECTION_SIZE_BITS 30, the reserved memmap is larger, it's a waste for us. Inspired by disscusion[1], reducing the SECTION_SIZE_BITS to 27 which means 128M section size saves us about 14MB, a huge gain for embeded memory constrained system. [1]http://lkml.iu.edu/hypermail/linux/kernel/1604.1/03036.html Signed-off-by: Jisheng Zhang --- arch/arm64/include/asm/sparsemem.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/include/asm/sparsemem.h b/arch/arm64/include/asm/sparsemem.h index 74a9d30..41c10f7 100644 --- a/arch/arm64/include/asm/sparsemem.h +++ b/arch/arm64/include/asm/sparsemem.h @@ -18,7 +18,11 @@ #ifdef CONFIG_SPARSEMEM #define MAX_PHYSMEM_BITS 48 +#ifdef CONFIG_ARM64_64K_PAGES #define SECTION_SIZE_BITS 30 +#else +#define SECTION_SIZE_BITS 27 +#endif #endif #endif -- 2.8.1