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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 D6FFDC43461 for ; Thu, 10 Sep 2020 13:39:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4B8A420809 for ; Thu, 10 Sep 2020 13:39:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B8A420809 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 778B6900005; Thu, 10 Sep 2020 09:39:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 728DD8E0001; Thu, 10 Sep 2020 09:39:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5F02F900005; Thu, 10 Sep 2020 09:39:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id 487C78E0001 for ; Thu, 10 Sep 2020 09:39:06 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id E8686181AEF1D for ; Thu, 10 Sep 2020 13:39:05 +0000 (UTC) X-FDA: 77247257850.10.nest18_1813cf1270e6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id BCC3C16A0BE for ; Thu, 10 Sep 2020 13:39:05 +0000 (UTC) X-HE-Tag: nest18_1813cf1270e6 X-Filterd-Recvd-Size: 2831 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Thu, 10 Sep 2020 13:39:05 +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 9C025ACAF; Thu, 10 Sep 2020 13:39:19 +0000 (UTC) Date: Thu, 10 Sep 2020 15:39:00 +0200 From: Oscar Salvador To: Michal Hocko Cc: Laurent Dufour , akpm@linux-foundation.org, David Hildenbrand , rafael@kernel.org, nathanl@linux.ibm.com, cheloha@linux.ibm.com, stable@vger.kernel.org, Greg Kroah-Hartman , linux-mm@kvack.org, LKML Subject: Re: [PATCH] mm: don't rely on system state to detect hot-plug operations Message-ID: <20200910133854.GA8713@linux> References: <4cdb54be-1a92-4ba4-6fee-3b415f3468a9@linux.ibm.com> <20200909105914.GF7348@dhcp22.suse.cz> <74a62b00-235e-7deb-2814-f3b240fea25e@linux.ibm.com> <20200910072331.GB28354@dhcp22.suse.cz> <31cfdf35-618f-6f56-ef16-0d999682ad02@linux.ibm.com> <20200910111246.GE28354@dhcp22.suse.cz> <20200910120343.GA6635@linux> <20200910124755.GG28354@dhcp22.suse.cz> <20200910124847.GH28354@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910124847.GH28354@dhcp22.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: BCC3C16A0BE X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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 Thu, Sep 10, 2020 at 02:48:47PM +0200, Michal Hocko wrote: > > Is there any actual usecase for a configuration like this? What is the > > point to statically define additional memory like this when the same can > > be achieved on the same command line? Well, for qemu I am not sure, but if David is right, it seems you can face the same if you reboot a vm with hotplugged memory. Moreover, it seems that the problem we spotted with [1], it was a VM running on Promox (KVM). The Hypervisor probably said at boot time "Ey, I do have these ACPI devices, care to enable them now"? As always, there are all sorts of configurations/scenarios out there in the wild. > Forgot to ask one more thing. Who is going to online that memory when > userspace is not running yet? Depends, if you have CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE set or you specify memhp_default_online_type=[online,online_*], memory will get onlined right after hot-adding stage: /* online pages if requested */ if (memhp_default_online_type != MMOP_OFFLINE) walk_memory_blocks(start, size, NULL, online_memory_block); If not, systemd-udev will do the magic once the system is up. -- Oscar Salvador SUSE L3