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=-17.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 0A3CDC433DB for ; Thu, 7 Jan 2021 12:31:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9D1FB2336D for ; Thu, 7 Jan 2021 12:31:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D1FB2336D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 75DE56B013B; Thu, 7 Jan 2021 07:31:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E5F26B027E; Thu, 7 Jan 2021 07:31:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5AD1C6B0293; Thu, 7 Jan 2021 07:31:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0197.hostedemail.com [216.40.44.197]) by kanga.kvack.org (Postfix) with ESMTP id 41E846B013B for ; Thu, 7 Jan 2021 07:31:03 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F34FB824556B for ; Thu, 7 Jan 2021 12:31:02 +0000 (UTC) X-FDA: 77678913606.15.ball94_160526c274ea Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id CC2EB1814B0C1 for ; Thu, 7 Jan 2021 12:31:02 +0000 (UTC) X-HE-Tag: ball94_160526c274ea X-Filterd-Recvd-Size: 4553 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Thu, 7 Jan 2021 12:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610022661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=URK/ursWdkuftdKkzSOXBWKsd1KzSb1xcPRs1K398PI=; b=Q2Al2Opr2z57ygsEDaFYTF1Wn8XDoltTYHR75YAg2qM87DMD19ymcQ1Jl0v62RMdA+DfLj TqnJkxAnBWpanWTAV67FokPya6ej4MibksQf0yrziuNTcRkXXWYO1vrte2lAtLpJm26jYA fROdHgjG2Rd5mBZLCVvo5kIXlEtUc98= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-151-S3Rp4NFnMBSnZwP0-6y_wg-1; Thu, 07 Jan 2021 07:30:59 -0500 X-MC-Unique: S3Rp4NFnMBSnZwP0-6y_wg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0742C107ACE6; Thu, 7 Jan 2021 12:30:58 +0000 (UTC) Received: from [10.36.114.161] (ovpn-114-161.ams2.redhat.com [10.36.114.161]) by smtp.corp.redhat.com (Postfix) with ESMTP id BC7DA5C8AA; Thu, 7 Jan 2021 12:30:56 +0000 (UTC) Subject: Re: [PATCH 1/1] arm64: make section size configurable for memory hotplug To: Anshuman Khandual , Sudarshan Rajagopalan , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <66f79b0c06602c22df4da8ff4a5c2b97c9275250.1609895500.git.sudaraja@codeaurora.org> <055b0aca-af60-12ad-cd68-e15440ade64b@arm.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Thu, 7 Jan 2021 13:30:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <055b0aca-af60-12ad-cd68-e15440ade64b@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 06.01.21 07:11, Anshuman Khandual wrote: > Hi Sudershan, > > This patch (and the cover letter) does not copy LAKML even though the > entire change here is arm64 specific. Please do copy all applicable > mailing lists for a given patch. > > On 1/6/21 6:58 AM, Sudarshan Rajagopalan wrote: >> Currently on arm64, memory section size is hard-coded to 1GB. >> Make this configurable if memory-hotplug is enabled, to support >> more finer granularity for hotplug-able memory. > > Section size has always been decided by the platform. It cannot be a > configurable option because the user would not know the constraints > for memory representation on the platform and besides it also cannot > be trusted. > >> >> Signed-off-by: Sudarshan Rajagopalan >> --- >> arch/arm64/Kconfig | 11 +++++++++++ >> arch/arm64/include/asm/sparsemem.h | 4 ++++ >> 2 files changed, 15 insertions(+) >> >> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig >> index 6d232837cbee..34124eee65da 100644 >> --- a/arch/arm64/Kconfig >> +++ b/arch/arm64/Kconfig >> @@ -294,6 +294,17 @@ config ARCH_ENABLE_MEMORY_HOTREMOVE >> config SMP >> def_bool y >> >> +config HOTPLUG_SIZE_BITS >> + int "Memory hotplug block size(29 => 512MB 30 => 1GB)" "Memory hotplug block size" and "HOTPLUG_SIZE_BITS" is confusing. It's the section size. Please use that terminology. (if at all, it would have to be "minimum memory hot(un)plug granularity", but even that is somewhat misleading) "SECTION_SIZE_BITS" But I agree that letting the user configure it is sub-optimal. >> + depends on SPARSEMEM >> + depends on MEMORY_HOTPLUG >> + range 28 30 > > 28 would not work for 64K pages. @Anshuman, what's your feeling about changing this to 128 MB for 4k/16k base pages (as we have on x86-64 right now) and 512 MB for 64k as default for now? (If we worry about the number of section bits in page->flags, we could glue it to vmemmap support where that does not matter) -- Thanks, David / dhildenb