Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10922894rwd; Thu, 22 Jun 2023 06:40:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40+TqzuwWZc7LW/EiVBwqw/DZjsowR37XDu5zYJcbhXdoDn7UMXu2U6b89qb9AUjxX1h/a X-Received: by 2002:a05:6a20:3951:b0:110:f66c:a0e1 with SMTP id r17-20020a056a20395100b00110f66ca0e1mr25867394pzg.14.1687441243345; Thu, 22 Jun 2023 06:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687441243; cv=none; d=google.com; s=arc-20160816; b=b6rtSYl9ZLfEvd3sTqzVWnl2b6vNawnBUthbRSKG83KRblVTl8Ui48MyoFAeLRXU3V zgmpuSTt1WngBBK9UqsVN73JAleHHqzMkC6dmxUY0u2/7eEWVD1e3f/bEsn9N3V3i4C+ MmYTxbc9g5EZBoO7+hAYW2ulCG2SUMLbCUCky9BJQN9Za9+zDjiSdrR4CoD3QwYmyS7s oKVpG/eL3/7xEiHhHfNbrFX3iDYonEK2+yKfw/1Kb0T/IKru7dR5SzdX2Hea/cJalJ2I gO5zQUoBLJS3nfcMFArlyBqkXWJsoDVzKNcx6e2Zl8HAnvBvr46RrH+8OlXkOHNFcFHP c/Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=t4v3fjr8O3XkP7qd/fUiTDWGPU0x9vZtGWQLkeZFiA4=; b=lcq7nNrjNANvmrZUL6xeuHapXUP5BYLp70/Y1BdXzXwjl8XIZ9qA5JvdrPrlPV0M0n BjeExNhYjPqGbv7coXwQyJsZmacNjoGpZgP8JC7UL7NGGZGFmsQWUP9dvMeFVTOLpKIv 15w7XBy7w9YLlWtp8kYC995E4jO8kVLRTwk7tiKbSXYfiq6iKGYCyn/gJw3Cy+RJtLqN ngEobEeJ1ftP6c2E02O6tWBaM9OaDGn6AIzfadtGDCAagaQcYvHgOQSqPAoDhgR/5gSq pr8gMpdsWu69eJkQChWubHk5IB6T2my9vsOm1ewLhqJexinxdTwBucNKKvIfl3ZVANA/ 44pA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b30-20020aa78ede000000b0063b7e177fc3si6276793pfr.165.2023.06.22.06.40.28; Thu, 22 Jun 2023 06:40:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230301AbjFVNiF (ORCPT + 99 others); Thu, 22 Jun 2023 09:38:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbjFVNh5 (ORCPT ); Thu, 22 Jun 2023 09:37:57 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D769719BE; Thu, 22 Jun 2023 06:37:56 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Qn1Zp5kQNz67ZCK; Thu, 22 Jun 2023 21:35:14 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 22 Jun 2023 14:37:54 +0100 Date: Thu, 22 Jun 2023 14:37:53 +0100 From: Jonathan Cameron To: David Hildenbrand CC: Vishal Verma , "Rafael J. Wysocki" , Len Brown , Andrew Morton , Oscar Salvador , "Dan Williams" , Dave Jiang , , , , , , Huang Ying , Dave Hansen Subject: Re: [PATCH 1/3] mm/memory_hotplug: Allow an override for the memmap_on_memory param Message-ID: <20230622143753.00000282@Huawei.com> In-Reply-To: <0ea4728a-8601-bf75-1921-bcde0818aac3@redhat.com> References: <20230613-vv-kmem_memmap-v1-0-f6de9c6af2c6@intel.com> <20230613-vv-kmem_memmap-v1-1-f6de9c6af2c6@intel.com> <0ea4728a-8601-bf75-1921-bcde0818aac3@redhat.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 16 Jun 2023 09:46:59 +0200 David Hildenbrand wrote: > On 16.06.23 00:00, Vishal Verma wrote: > > For memory hotplug to consider MHP_MEMMAP_ON_MEMORY behavior, the > > 'memmap_on_memory' module parameter was a hard requirement. > > > > In preparation for the dax/kmem driver to use memmap_on_memory > > semantics, arrange for the module parameter check to be bypassed via the > > appropriate mhp_flag. > > > > Recall that the kmem driver could contribute huge amounts of hotplugged > > memory originating from special purposes devices such as CXL memory > > expanders. In some cases memmap_on_memory may be the /only/ way this new > > memory can be hotplugged. Hence it makes sense for kmem to have a way to > > force memmap_on_memory without depending on a module param, if all the > > other conditions for it are met. > > Just let the admin configure it. After all, an admin is involved in > configuring the dax/kmem device to begin with. If add_memory() fails you > could give a useful hint to the admin. > Agreed. If it were just the default then fine, but making it the only option limits admin choices. Jonathan