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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 D0B43C433E0 for ; Mon, 8 Mar 2021 15:46:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 53C706521D for ; Mon, 8 Mar 2021 15:46:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53C706521D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DD83A8D0035; Mon, 8 Mar 2021 10:46:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D88508D001D; Mon, 8 Mar 2021 10:46:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C29318D0035; Mon, 8 Mar 2021 10:46:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0052.hostedemail.com [216.40.44.52]) by kanga.kvack.org (Postfix) with ESMTP id A870C8D001D for ; Mon, 8 Mar 2021 10:46:14 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 684A1180AD81D for ; Mon, 8 Mar 2021 15:46:14 +0000 (UTC) X-FDA: 77897133468.22.C0F591C Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf27.hostedemail.com (Postfix) with ESMTP id 7DE6080192D5 for ; Mon, 8 Mar 2021 15:46:08 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id F2480ADDB; Mon, 8 Mar 2021 15:46:09 +0000 (UTC) Date: Mon, 8 Mar 2021 16:46:07 +0100 From: Oscar Salvador To: David Hildenbrand Cc: Andrew Morton , Michal Hocko , Anshuman Khandual , Vlastimil Babka , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/5] mm,memory_hotplug: Add kernel boot option to enable memmap_on_memory Message-ID: <20210308154603.GA23272@linux> References: <20210304100002.7740-1-osalvador@suse.de> <20210304100002.7740-4-osalvador@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Stat-Signature: c36ggm6fn5bz9iqzte1jdydckf5ta96u X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 7DE6080192D5 Received-SPF: none (suse.de>: No applicable sender policy available) receiver=imf27; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1615218368-703635 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 Fri, Mar 05, 2021 at 04:35:08PM +0100, David Hildenbrand wrote: > On 04.03.21 11:00, Oscar Salvador wrote: > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > > index 04545725f187..e626dab39c60 100644 > > --- a/Documentation/admin-guide/kernel-parameters.txt > > +++ b/Documentation/admin-guide/kernel-parameters.txt > > @@ -2794,6 +2794,20 @@ > > seconds. Use this parameter to check at some > > other rate. 0 disables periodic checking. > > + memory_hotplug.memmap_on_memory > > + [KNL,X86,ARM] Boolean flag to enable this feature. > > Right now it can be set on any arch with memory hotplug, right? It's simply > not effective. Right. > > + Format: {on | off (default)} > > + When enabled, memory to build the pages tables for the > > + memmap array describing the hot-added range will be taken > > + from the range itself, so the memmap page tables will be > > + self-hosted. > > + Since only single memory device ranges are supported at > > + the moment, this option is disabled by default because > > + it might have an impact on workloads that needs large > > + contiguous memory chunks. > > + The state of the flag can be read in > > + /sys/module/memory_hotplug/parameters/memmap_on_memory. > > Maybe want to add that even if enabled, there are cases where it is not > effective? Sure, I already added a hint. > > +static bool memmap_on_memory __ro_after_init; > > +module_param(memmap_on_memory, bool, 0444); > > +MODULE_PARM_DESC(memmap_on_memory, "Enable memmap on memory for memory hotplug"); > > Wondering if this makes sense getting wrapped in > > #ifdef CONFIG MHP_MEMMAP_ON_MEMORY > > just a thought. Definitely, will wrapp it with MHP_MEMMAP_ON_MEMORY. > > LGTM > > Reviewed-by: David Hildenbrand Thanks! -- Oscar Salvador SUSE L3