Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1412032pxk; Thu, 10 Sep 2020 14:52:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysQv9skMqiSiam44WVba6fYLcKGJx+tLiGGbr57brQQjeg3GQEmH7TnQ0OVU/+b/YOWUe8 X-Received: by 2002:a50:fc83:: with SMTP id f3mr12024997edq.102.1599774766839; Thu, 10 Sep 2020 14:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599774766; cv=none; d=google.com; s=arc-20160816; b=xWHhWd4cYzmBmlm8zziuW6j+k34Dh5kfx9phvDqFpCESSTWF5qIcVeyOdx/a4ZMUSJ qZm95nebg4tw1/Kxl+MpgnkYIYLsakLaeOlvPVbxV+aUSFmDzJZwgzCxxMNMw/KGX+Sv ap8jLlvLFDHqql22Hjg7+2ETJlGjFxBFJsxFJYF8yAHGOR1j7/hDURvMc+jKRiBLax8Q t0FMjU60JdQhDnajheKJhfxVgnRNIiw1DoTjlZALcEgWMLjdtRI0qPttgm/Vx2lJ/Cln H8iIgvnO32N2t4/uoI7lRYSXXKLGjM+Yyc2JdEJS7EJSrksJvmFhs1Vuys3gXr4EMLlK nVvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=uabu9g4utdIrdKStX1Oa8XLzlE2KLzlv8Ck8wRxufuo=; b=JUw5dqxfEhVA9gtvGl8srCICJrOCIL66hguwFHr7JdkkpU+xOxScnpbUxF94+hycDr o8xMXK5EmRmP+N0RhBAOslqvaD8R06sjvlFCpv3Y9OBStu4qWNO1o9bSFJ8FePDroCbP WaxBd/sDyfDfOP5MX2zMz+i3LTVORv1Mo1fffDVKIM1L67gM0hCeU5pLNzoWXYjlFhoi 1FnN5VVBlVkdghgHqlnQszSiykVCSJhdmIEd/NJyQCJhmBU36XNV0Hch0MsfN2XaP6uz uDkCVJulpdKKNRKkjKPb+xCo0riV60g84Ds2Z8LooSgmqJZW8ZHV7phtS4rndDk3QlMf zNbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j24si4363583edt.105.2020.09.10.14.52.23; Thu, 10 Sep 2020 14:52:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728826AbgIJVov (ORCPT + 99 others); Thu, 10 Sep 2020 17:44:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:41698 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730395AbgIJMsP (ORCPT ); Thu, 10 Sep 2020 08:48:15 -0400 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 D0466AD1A; Thu, 10 Sep 2020 12:48:11 +0000 (UTC) Date: Thu, 10 Sep 2020 14:47:55 +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: <20200910124755.GG28354@dhcp22.suse.cz> References: <9faac1ce-c02d-7dbc-f79a-4aaaa5a73d28@linux.ibm.com> <20200909090953.GE7348@dhcp22.suse.cz> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910120343.GA6635@linux> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 10-09-20 14:03:48, Oscar Salvador wrote: > On Thu, Sep 10, 2020 at 01:35:32PM +0200, Laurent Dufour wrote: > > > That points has been raised by David, quoting him here: > > > > > IIRC, ACPI can hotadd memory while SCHEDULING, this patch would break that. > > > > > > Ccing Oscar, I think he mentioned recently that this is the case with ACPI. > > > > Oscar told that he need to investigate further on that. > > I think my reply got lost. > > We can see acpi hotplugs during SYSTEM_SCHEDULING: > > $QEMU -enable-kvm -machine pc -smp 4,sockets=4,cores=1,threads=1 -cpu host -monitor pty \ > -m size=$MEM,slots=255,maxmem=4294967296k \ > -numa node,nodeid=0,cpus=0-3,mem=512 -numa node,nodeid=1,mem=512 \ > -object memory-backend-ram,id=memdimm0,size=134217728 -device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \ > -object memory-backend-ram,id=memdimm1,size=134217728 -device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \ > -object memory-backend-ram,id=memdimm2,size=134217728 -device pc-dimm,node=0,memdev=memdimm2,id=dimm2,slot=2 \ > -object memory-backend-ram,id=memdimm3,size=134217728 -device pc-dimm,node=0,memdev=memdimm3,id=dimm3,slot=3 \ > -object memory-backend-ram,id=memdimm4,size=134217728 -device pc-dimm,node=1,memdev=memdimm4,id=dimm4,slot=4 \ > -object memory-backend-ram,id=memdimm5,size=134217728 -device pc-dimm,node=1,memdev=memdimm5,id=dimm5,slot=5 \ > -object memory-backend-ram,id=memdimm6,size=134217728 -device pc-dimm,node=1,memdev=memdimm6,id=dimm6,slot=6 \ > > kernel: [ 0.753643] __add_memory: nid: 0 start: 0100000000 - 0108000000 (size: 134217728) > kernel: [ 0.756950] register_mem_sect_under_node: system_state= 1 > > kernel: [ 0.760811] register_mem_sect_under_node+0x4f/0x230 > kernel: [ 0.760811] walk_memory_blocks+0x80/0xc0 > kernel: [ 0.760811] link_mem_sections+0x32/0x40 > kernel: [ 0.760811] add_memory_resource+0x148/0x250 > kernel: [ 0.760811] __add_memory+0x5b/0x90 > kernel: [ 0.760811] acpi_memory_device_add+0x130/0x300 > kernel: [ 0.760811] acpi_bus_attach+0x13c/0x1c0 > kernel: [ 0.760811] acpi_bus_attach+0x60/0x1c0 > kernel: [ 0.760811] acpi_bus_scan+0x33/0x70 > kernel: [ 0.760811] acpi_scan_init+0xea/0x21b > kernel: [ 0.760811] acpi_init+0x2f1/0x33c > kernel: [ 0.760811] do_one_initcall+0x46/0x1f4 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? -- Michal Hocko SUSE Labs