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=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 DC5E0C43603 for ; Tue, 10 Dec 2019 11:33:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A6B4320663 for ; Tue, 10 Dec 2019 11:33:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6B4320663 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3D7F46B2C12; Tue, 10 Dec 2019 06:33:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 389336B2C13; Tue, 10 Dec 2019 06:33:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 29F056B2C14; Tue, 10 Dec 2019 06:33:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0115.hostedemail.com [216.40.44.115]) by kanga.kvack.org (Postfix) with ESMTP id 1419D6B2C12 for ; Tue, 10 Dec 2019 06:33:45 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id A92988249980 for ; Tue, 10 Dec 2019 11:33:44 +0000 (UTC) X-FDA: 76249021968.17.stew32_5adaf0154631f X-HE-Tag: stew32_5adaf0154631f X-Filterd-Recvd-Size: 4090 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Dec 2019 11:33:44 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id z7so19532278wrl.13 for ; Tue, 10 Dec 2019 03:33:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5FjJVeyO3t8h7dBh1OV5fyqjNeQvVR1/7i0vehSFQ7Q=; b=ByaAFfXIdcLUvdsv+42Wq8496QT9I8IyYNJS2xQsLwuAfQ3ZuuGRPrQ3rcaCABt32Y /al3ju7h+lIWzL+EQfaUBszZyISbT8OCcCUEVw5VhIp6RkvNrZ34m+YFJspfnbhKOLQf ZG94fyp4LjYqBL/l4wDfelmdXZAgFUlTvkrQDkfURAactxt8iMY1mrmViSdKGK9DF5WB aKm00nMN/fkhiKgjpnCjUH4Dxj59DOVKvrelppMKpKqpZJni4c1S9Eztc5l6ia2zI9KQ 3tF3EIwBoijHTzEkvDerROFXoqZFA3qSi19COBvf/0k27FJYURu/07gRPWgiHZ/5PfxN 5wPg== X-Gm-Message-State: APjAAAVKQYPfSeoGvwq0I9NbtJWWT7lxOoyxVIIKvmucaaZIEKfHeOcZ xrIOTNy8SIVkATo1p5oRgAA= X-Google-Smtp-Source: APXvYqzkugwvlsjND7ToEIirpqoYxESepaGkmHvs85JyAcauF8rYz8Sxxgefxkb/nARkaEk8hRhsRw== X-Received: by 2002:adf:c74f:: with SMTP id b15mr2709672wrh.272.1575977623129; Tue, 10 Dec 2019 03:33:43 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id v188sm2784884wma.10.2019.12.10.03.33.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2019 03:33:42 -0800 (PST) Date: Tue, 10 Dec 2019 12:33:41 +0100 From: Michal Hocko To: Baoquan He Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, jgross@suse.com, william.kucharski@oracle.com, mingo@kernel.org, akpm@linux-foundation.org Subject: Re: [PATCH] mm/hotplug: Only respect mem= parameter during boot stage Message-ID: <20191210113341.GG10404@dhcp22.suse.cz> References: <20191206150524.14687-1-bhe@redhat.com> <20191209100717.GC6156@dhcp22.suse.cz> <20191210072453.GI2984@MiWiFi-R3L-srv> <20191210102834.GE10404@dhcp22.suse.cz> <20191210104303.GN2984@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191210104303.GN2984@MiWiFi-R3L-srv> User-Agent: Mutt/1.12.2 (2019-09-21) 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 Tue 10-12-19 18:43:03, Baoquan He wrote: > On 12/10/19 at 11:28am, Michal Hocko wrote: > > On Tue 10-12-19 15:24:53, Baoquan He wrote: [...] > > > But after system bootup, we should be able to hot add/remove any memory > > > board. This should not be restricted by a boot-time kernel parameter > > > 'mme='. This is what I am trying to fix. > > > > This is a simple statement without any actual explanation on why. Why is > > hotplug memory special? What is the usecase? Who would want to use mem > > parameter and later expect a memory above the restrected area to be > > hotplugable? > > The why is 'mem=' is used to restrict the amount of system ram during > boot. We have two ways to add system memory, one is installing DIMMs > before boot, the other is hot adding memory after boot. Without David's > use case, we may need redefine 'mem=' and change its documentation in > kernel-parameters.txt, if we don't want to fix it like this. Otherwise, > 'mem=' will limit the system's upper system ram always, that is not > expected. I really do not see why. It seems a pretty consistent behavior to me. Because it essentially cut any memory above the given size. If a new hotplugable memory fits into that cap then it just shows up. Quite contrary I would consider it unexpected that a memory higher than the given mem=XYZ is really there. But I do recognize a real usecase mentioned elsewhere which beats the consistency argument here because all setups where such a restriction would be really important are debugging/workaround AFAICS. -- Michal Hocko SUSE Labs