Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp488515ybh; Wed, 22 Jul 2020 05:52:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz313VSDd/UChFhyPq4WEsPQjRe1npFE1i/JUmhsLRxQbPbRtNiZy9m8yZ0JOejn0LWvtLg X-Received: by 2002:aa7:d8ca:: with SMTP id k10mr30754240eds.108.1595422366362; Wed, 22 Jul 2020 05:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595422366; cv=none; d=google.com; s=arc-20160816; b=j6FHyMmQcE0/skPR4M/e+rweo6BawT+zw1GRC0QjIVzELV0ziSa0UJD080y3rNhsR0 5Oc/2Uomn2KlNkZKe0UxiwgcMi6qvIPTeSdAm3nJQz7wIjcf1uhEnVGlQAWYToT9Q0MT D5Ybhcmh9rZtKqexSszikQUHk1qRPJj+uRZYCYwF1k39yJiGMRJqOWh6YzUPSUl6JaID WFJfTgAGH7GVvWGAUAR3yAMq6rSNz9tlV/Mr2iA/ah7z7n1NUlW++2u/i9q/jE9yLbyk zBdOKTy5hCMetmGYG4MQ2fs9+0YRY343hoU3XCCLIrSL1MVNBuAHq+WlimK+zEf0/Q5z l8pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=CEbyqredDK1nduCH1qqKn0SY+R8R79PWP4V/wJyG5TE=; b=pSf3boXXCs2aoNMiOsnDj0SFQd9rJUKUeFn6uJDMhqaTVXUVUjs156jxq2Y/Mxj/KY p7WMdpc5WDkXUbMZUG0SAZ9nJ4an5s41PFZx6FDFelf/q5fgHsxGKbY/mZ1jgaz7Z5cm 91coL19UKLkz/npeoWWifLt4RbPBBHAU7dFQQUslNhZO831iNylumh1JnqEDXQ+IKzGx rTDxLx20ZS0PtEkg+ZxoGGmySAsi9/FdqOWkAiIn+j75wPMkQgZxFUQ+V9bjh7GD8LIq Xq8yE9H5JgMH64uvXGQTGDsZ5DVoNOzVG91A+YXcPBm41x5LnbudzZycyyJbnCiVHFMG qCZQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fi17si13812200ejb.724.2020.07.22.05.52.23; Wed, 22 Jul 2020 05:52:46 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732360AbgGVMtQ (ORCPT + 99 others); Wed, 22 Jul 2020 08:49:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:45756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732253AbgGVMtP (ORCPT ); Wed, 22 Jul 2020 08:49:15 -0400 Received: from gaia (unknown [95.146.230.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 471B520729; Wed, 22 Jul 2020 12:49:13 +0000 (UTC) Date: Wed, 22 Jul 2020 13:49:10 +0100 From: Catalin Marinas To: "liwei (CM)" Cc: Mike Rapoport , "will@kernel.org" , "Xiaqing (A)" , "Chenfeng (puck)" , butao , fengbaopeng , "nsaenzjulienne@suse.de" , "steve.capper@arm.com" , "Song Bao Hua (Barry Song)" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , sujunfei , zhaojiapeng Subject: Re: =?utf-8?B?562U5aSNOiBbUEFUQ0hdIGFybTY0?= =?utf-8?B?OiBtbTogZnJl?= =?utf-8?Q?e?= unused memmap for sparse memory model that define VMEMMAP Message-ID: <20200722124910.GE27540@gaia> References: <20200721073203.107862-1-liwei213@huawei.com> <20200722060705.GK802087@linux.ibm.com> <1699CE87DE933F49876AD744B5DC140F2312E948@dggemm526-mbx.china.huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1699CE87DE933F49876AD744B5DC140F2312E948@dggemm526-mbx.china.huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 22, 2020 at 08:41:17AM +0000, liwei (CM) wrote: > Mike Rapoport wrote: > > On Tue, Jul 21, 2020 at 03:32:03PM +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, this patch do it. > > > > Are there numbers showing how much memory is actually freed? > > > > The freeing of empty memmap would become rather complex with these > > changes, do the memory savings justify it? > > In the sparse memory model, the size of a section is 1 GB > (SECTION_SIZE_BITS 30) by default. Can we reduce SECTION_SIZE_BITS instead? Say 26? -- Catalin