Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5166126ybl; Tue, 10 Dec 2019 01:27:12 -0800 (PST) X-Google-Smtp-Source: APXvYqykf2h81OdEmgEn2x8ojKuCZlclsZKUOc/bEwbvyi3e53OVd2eBSanEr0rC+BlOoztMs4iv X-Received: by 2002:a05:6830:2111:: with SMTP id i17mr23919916otc.24.1575970032891; Tue, 10 Dec 2019 01:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575970032; cv=none; d=google.com; s=arc-20160816; b=l/YAUnrS1N5g4lczKnVtml606BN5R0JLLG3FkIrJ3jgAGlwsHq7n8k6eHttAuLIH8I WUcSY21KRDCf1bhngTKi43S1EVM+YXyaY/kjcE+G60MRdHIPd199FtDX/XFWSGANh0Md WPThQ/KZd6z8PgqVEpCimGvrHHTbH0Bd11nAosx/ZGCjcWkEAH+brehuuwhFVmL+fUIR 3nuyeEhc68bhFEKLoAIXRuzKWqPn1iiLBAypYT1cZ8njjHpLvrlwSxG3FI71Jb0/Peop NEVYVPNopgf2/ZTWw4wXtyMbBHK1+4V2PeMxVxYFeaokeOk7KaW4i61+Alm+CYvFPLej 7Ubw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=bwAtdmxvGyrCILPXFQvJnltIvhpI4gs5tXgbrhs6Bw8=; b=mlezF8/32Tev4UW2V/BeIkafBOU68GlHajlLXipFQJ4ln4BsMgg+kcbJ+Afi5CN3iU tF8ydUC9M8isZPOPXsAxlnZz341hltJLI6tPLwurfWdV18GOLGkym7F6ccM7VQKjua8V 8HyRrTmxjR5BLfo+mD5+TB7VHi108fqOGuXXj0WD0Qn2xFOMVE4um1MagW6F3gSjhLRy z5YaJhzcKUgF0GCb7LLtDjZ/IZQ0LM2VVgCpPgxmIB4h/JyuvEX/LfiSKDVhxmNlHw13 wZTOadcyuDhOUQ1mEgVEDS/L751gHmtTF63UC0/OWgLwNJ+DlVbv4q5dNngB0KQrmi4b e2mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="AAWTnfs/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16si2051529otk.151.2019.12.10.01.26.59; Tue, 10 Dec 2019 01:27:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="AAWTnfs/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727026AbfLJJZF (ORCPT + 99 others); Tue, 10 Dec 2019 04:25:05 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:33059 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726574AbfLJJZF (ORCPT ); Tue, 10 Dec 2019 04:25:05 -0500 Received: by mail-lf1-f66.google.com with SMTP id n25so13166852lfl.0 for ; Tue, 10 Dec 2019 01:25:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=bwAtdmxvGyrCILPXFQvJnltIvhpI4gs5tXgbrhs6Bw8=; b=AAWTnfs/Eo6Hj9n5OB6phmWbD1m15J5X8zumgD18FNQPA7cz27EvX1/21ZhNTbTPUY XGkSjBCWioOl7cC9OShUkrEKjWSkJX+5pVSLHJxNAGJsts66j+RkjZKoV9kGHo5xR9kH GwHXNIfkPO4sCcaUllxE+QKhWrY0ySSM3eYgYneiUTqBcR+CyGtTLgsL3KPyQtKw0Ib8 aeR8A4Smt36NwUgCjEfjt5srHlEM9A5By9QYXtSzyR661zdeCMX9O2ejs05kko8w2PCp m3RoIKrDuiJa7+GEH9hm00BQcZc0Ry7JEYWvvyK1tkUZw3KKqEB/bG3BzdJmvRp1O2aD B1IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bwAtdmxvGyrCILPXFQvJnltIvhpI4gs5tXgbrhs6Bw8=; b=JHhrnbMU40gFWxsvk6VpeJl5MrE0vjOvB0cLXxgOixBNTy3Oh1u4cQA6mdPtNJG1mH /3I+EWYF2yu7ZJm6sGEbBfEG4+6eXnJ2SZii0AngTPQMiQ8XPB9eYXQDg72fpxmnC9SL KUyA5LMpSwivOmCddQd391qbk94i2BkB+ThEJqiAJNGSHK23eS9KQGirDqpZ6tKbUkLB fSBuNJYWhahmqQ/WNppUw8WNLquMbJcaJjqMxBoIUuehww6HcTfe49ODe8PYPPvOJsMb KgHVbK08Fh+bMgb0jyG7w4hYkjnkLku3DkURJiUym8XzFmC8CRoFmTbpn2R+LZMgXvn6 NHmg== X-Gm-Message-State: APjAAAVQJFo5b/KRQLRfIPOHGIIRpB8QLSgcpMW+cZAhcgKvFE7iPVBK K2+WcM7lDCl607BKi54VPSARJynKA4g= X-Received: by 2002:a19:c1c1:: with SMTP id r184mr4402876lff.128.1575969902911; Tue, 10 Dec 2019 01:25:02 -0800 (PST) Received: from [192.168.68.106] ([193.119.54.228]) by smtp.gmail.com with ESMTPSA id 22sm1689626ljw.9.2019.12.10.01.24.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Dec 2019 01:25:02 -0800 (PST) Subject: Re: [Patch v2] mm/hotplug: Only respect mem= parameter during boot stage To: Baoquan He , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, mhocko@kernel.org, david@redhat.com, jgross@suse.com, akpm@linux-foundation.org References: <20191210084413.21957-1-bhe@redhat.com> From: Balbir Singh Message-ID: <75188d0f-c609-5417-aa2e-354e76b7ba6e@gmail.com> Date: Tue, 10 Dec 2019 20:24:55 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191210084413.21957-1-bhe@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/12/19 7:44 pm, Baoquan He wrote: > In commit 357b4da50a62 ("x86: respect memory size limiting via mem= > parameter") a global varialbe global max_mem_size is added to store typo ^^^ > the value parsed from 'mem= ', then checked when memory region is > added. This truly stops those DIMM from being added into system memory > during boot-time. > > However, it also limits the later memory hotplug functionality. Any > memory board can't be hot added any more if its region is beyond the > max_mem_size. System will print error like below: > > [ 216.387164] acpi PNP0C80:02: add_memory failed > [ 216.389301] acpi PNP0C80:02: acpi_memory_enable_device() error > [ 216.392187] acpi PNP0C80:02: Enumeration failure > > From document of 'mem= ' parameter, it should be a restriction during > boot, but not impact the system memory adding/removing after booting. > > mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory > ... > > So fix it by also checking if it's during boot-time when restrict memory > adding. Otherwise, skip the restriction. > The fix looks reasonable, but I don't get the use case. Booting with mem= is generally a debug option, is this for debugging memory hotplug + limited memory? Balbir