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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 0793FC433E2 for ; Thu, 10 Sep 2020 13:51:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 625322087C for ; Thu, 10 Sep 2020 13:51:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 625322087C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 73224900003; Thu, 10 Sep 2020 09:51:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E3436B0072; Thu, 10 Sep 2020 09:51:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 62068900003; Thu, 10 Sep 2020 09:51:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id 4D6146B0071 for ; Thu, 10 Sep 2020 09:51:09 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 0E481181AEF0B for ; Thu, 10 Sep 2020 13:51:09 +0000 (UTC) X-FDA: 77247288258.21.pin46_4e0a1e3270e6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id CEDEC180442C2 for ; Thu, 10 Sep 2020 13:51:08 +0000 (UTC) X-HE-Tag: pin46_4e0a1e3270e6 X-Filterd-Recvd-Size: 3024 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Thu, 10 Sep 2020 13:51:08 +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 BA407B04F; Thu, 10 Sep 2020 13:51:22 +0000 (UTC) Date: Thu, 10 Sep 2020 15:51:06 +0200 From: Michal Hocko To: Oscar Salvador 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: <20200910135106.GI28354@dhcp22.suse.cz> References: <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> <20200910133854.GA8713@linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910133854.GA8713@linux> X-Rspamd-Queue-Id: CEDEC180442C2 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 10-09-20 15:39:00, Oscar Salvador wrote: > 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. OK, thanks for the clarification. I was not aware of the reboot. > 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. Does that imply that we need udev to scan all existing devices and reprobe them? -- Michal Hocko SUSE Labs