From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752175AbcHKXNj (ORCPT ); Thu, 11 Aug 2016 19:13:39 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54047 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751022AbcHKXNh (ORCPT ); Thu, 11 Aug 2016 19:13:37 -0400 Date: Thu, 11 Aug 2016 16:13:35 -0700 From: Andrew Morton To: Xishi Qiu Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Vlastimil Babka , Mel Gorman , Michal Hocko , David Rientjes , "Joonsoo Kim" , Taku Izumi , "'Kirill A . Shutemov'" , Kamezawa Hiroyuki , Linux MM , LKML Subject: Re: [PATCH 1/3] mem-hotplug: introduce movablenode option Message-Id: <20160811161335.8599521d14927394f1208fc7@linux-foundation.org> In-Reply-To: <57A325CA.9050707@huawei.com> References: <57A325CA.9050707@huawei.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Aug 2016 19:23:54 +0800 Xishi Qiu wrote: > This patch introduces a new boot option movablenode. > > To support memory hotplug, boot option "movable_node" is needed. And to > support debug memory hotplug, boot option "movable_node" and "movablenode" > are both needed. > > e.g. movable_node movablenode=1,2,4 I have some naming concerns. "movable_node" and "movablenode" is just confusing and ugly. Can we just use the one parameter? eg, vmlinux movable_node or vmlinux movable_node=1,2,4 if not that, then how about "movable_node" and "movable_nodes"? Then every instance of "movablenode" in the patch itself should become "movable_nodes" to be consistent with the command line parameter. > It means node 1,2,4 will be set to movable nodes, the other nodes are > unmovable nodes. Usually movable nodes are parsed from SRAT table which > offered by BIOS, so this boot option is used for debug. > > > --- > Documentation/kernel-parameters.txt | 4 ++++ > arch/x86/mm/srat.c | 36 ++++++++++++++++++++++++++++++++++++ > 2 files changed, 40 insertions(+) > > diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt > index 82b42c9..f8726f8 100644 > --- a/Documentation/kernel-parameters.txt > +++ b/Documentation/kernel-parameters.txt > @@ -2319,6 +2319,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. > movable_node [KNL,X86] Boot-time switch to enable the effects > of CONFIG_MOVABLE_NODE=y. See mm/Kconfig for details. > > + movablenode= [KNL,X86] Boot-time switch to set which node is > + movable node. > + Format: ,..., I think the docs should emphasize that this option disables the usual SRAT-driven allocation and replaces it with manual allocation. Also, can we please have more details in the patch changelog? Why do we *need* this? Just for debugging? Normally people will just use SRAT-based allocation so normal users won't use this? If so, why is this debugging feature considered useful enough to add to the kernel?