From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932961AbbIVIT2 (ORCPT ); Tue, 22 Sep 2015 04:19:28 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:22640 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756650AbbIVITY (ORCPT ); Tue, 22 Sep 2015 04:19:24 -0400 To: , , , , , , CC: Yiping Xu , , , Dan zhao , "Peter Panshilin" , qijiwen From: chenfeng Subject: Question about the sparse memory section size Message-ID: <56010DDD.3080803@hisilicon.com> Date: Tue, 22 Sep 2015 16:14:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.142.192.172] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, The sparse memory section size, SECTION_SIZE_BITS, currently is 1GB for arm64 by default. However, it might generate wasted memmap memory space for those memory sections less than 1GB. e.g. for 512MB memory section, still 14MB(sizeof(struct page) * PAGES_PER_SECTION) memmap needs to be reserved. The wasted memmap space could be eliminated by changing memory section size from 1GB to 512M, but still some questions to be answered, 1) why arm64 uses 1GB as default setting? 2) any risk to change section size from 1GB to 512MB? like, any impact to performance since memory section number is increased. Any help will be appreciated. Puck