Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp839412pxb; Wed, 29 Sep 2021 10:43:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1Cr8aP1RsbXhZQqHWK6ax/0UPOlTp/AsCMoyMu0oTSrLLh0Z5W9+a6rJjHz1OUETv/zHM X-Received: by 2002:a17:90b:1e4d:: with SMTP id pi13mr7892887pjb.96.1632937421102; Wed, 29 Sep 2021 10:43:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632937421; cv=none; d=google.com; s=arc-20160816; b=vJ2EgLJkTtEw9OlnLtdF4e8yIG6tVA6IoxppGQv4SSYzrQ+gwayzNdhniGby3FenFN fZkXG0je9vBNSBCUpbF0ExjMrqVGfy40xvyJdYJmNWKmCmqJIXrU5uzNYO7oxWuwCnh9 Zvg6MhDKP5nM7M0p2Q6J0Z1jmoBwWFXI3JqMQphmbyM+cyTur12xtpZ0fKEgtypExdJb xxc8vMpnW8wCft73yqG281fcoOAbQMrTccxOke6Ix+sZab4dY1Ms2KgWie5tEsVEKeBI cW1Bd4Jk9TJ8f5RCD/hyiNThqa9a32NE5f5o8WUZebYcRuEmB3fwNoA5anKotKjzTeVi qXdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=LzEA/AMsDC+zBVogDRmix14O9ZRH28vVpD1t8BFMOTQ=; b=uFFR+JlmY93xsEvb1vMdhWgwTKg/5Y1+pKrp44MvkEa3R9u6oDmxKrCURR3vQXJZgM 9GvhOw3hpOkvnrTJHHnYGCNOfJyOTqpYsTpicleIbu2jjVQlXMbO/YtAFgiyOSNoR5da /9Gz4aKyAxbOURBGYUXY0y6z7KDJKviJ2jL6NpAW+pI8i7E4z/rVY6oc92uZvCF/xrI1 Hiqq4d7QYJ5c59tARn44vsDOgh1pWep0zQYybJBU9ToADdgf+8R2wDylMnjDBPckIZnR FJqir3vm/02YnI+XNm7HRAqnfYhGGOgFTWjLCvwmJMGrLIMdmnHdR13kr4/Q3DM41yQB S/YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OHBmXcXF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q9si504686pgk.137.2021.09.29.10.43.11; Wed, 29 Sep 2021 10:43:41 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OHBmXcXF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345867AbhI2Qb4 (ORCPT + 99 others); Wed, 29 Sep 2021 12:31:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:56440 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345687AbhI2Qbz (ORCPT ); Wed, 29 Sep 2021 12:31:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632933014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LzEA/AMsDC+zBVogDRmix14O9ZRH28vVpD1t8BFMOTQ=; b=OHBmXcXFal572r+La62x/Pn62V3aPieYOB7wpdnX+fdQtLC0NoStUv+jiupRblcNaL3ueG KAyzB/qmCFYPkPzJ99/RNGLkOgQmgI6ENjA0Hl59ZGewjTj0IjWYZ6sXmWRuGDsqkZZI1A WaMksgp254vi7iOLDxJkYraotUwtBZw= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-3-axm7TcP3OvOWmhsUEMTxHQ-1; Wed, 29 Sep 2021 12:30:12 -0400 X-MC-Unique: axm7TcP3OvOWmhsUEMTxHQ-1 Received: by mail-wm1-f69.google.com with SMTP id j21-20020a05600c1c1500b0030ccce95837so1031703wms.3 for ; Wed, 29 Sep 2021 09:30:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=LzEA/AMsDC+zBVogDRmix14O9ZRH28vVpD1t8BFMOTQ=; b=CbIUd+YJarP5E2NEvWJTkPuukBJBPcbIxBN0X4FHMAIuolntrmBG2x9PpREyIJ9mIQ ifwBzbxhN5K2Xeyg3HMFKUVtXjifhSFVlzyW/mEXDGsePk4jA+hSsl0G/cRL3XAKNy+w 2rUV2NPVo+UQtY81Ll7kjvphW2RwoabfIE6tMgG9ej9yJNtGEEPkRSqdHTbaJF4qiynI f44mOhZpdiMsqaIxdgWl2QOykxbK+YuCQnsjPVYfFpjWkIwDqPUpv6VZn/nD+llLbcae a7jfWlGBxvk04EmBq/2Q4g4S91gx4FW8aPBiW8qK5CRzITqGJjXZ5oh/LkFLTM+MTiHj Vwow== X-Gm-Message-State: AOAM533UtO6yyXlXfQLZ2uKgnVge0y7rQ5CCWAgWx908+lkIJ+pMo4B3 NB3dRbSXgi9tLBEJbxxXwtYB1/QYw67C8i28dZHZ82JN8HoSIgkA37U4bxdR0BtkocTD/Q6XP1P xO9BkxKMl92JAcVHoA5/fF/2c X-Received: by 2002:a05:6000:184c:: with SMTP id c12mr1026243wri.150.1632933011555; Wed, 29 Sep 2021 09:30:11 -0700 (PDT) X-Received: by 2002:a05:6000:184c:: with SMTP id c12mr1026220wri.150.1632933011388; Wed, 29 Sep 2021 09:30:11 -0700 (PDT) Received: from [192.168.3.132] (p4ff23c3b.dip0.t-ipconnect.de. [79.242.60.59]) by smtp.gmail.com with ESMTPSA id m21sm354405wmq.37.2021.09.29.09.30.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Sep 2021 09:30:10 -0700 (PDT) Subject: Re: [PATCH v1 2/4] memblock: allow to specify flags with memblock_add_node() To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, Andrew Morton , Michal Hocko , Oscar Salvador , Jianyong Wu , "Aneesh Kumar K . V" , Vineet Gupta , Geert Uytterhoeven , Huacai Chen , Jiaxun Yang , Thomas Bogendoerfer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Eric Biederman , Arnd Bergmann , linux-snps-arc@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, linux-mm@kvack.org, kexec@lists.infradead.org References: <20210927150518.8607-1-david@redhat.com> <20210927150518.8607-3-david@redhat.com> From: David Hildenbrand Organization: Red Hat Message-ID: <3651c7d0-f7b6-63ff-216a-b74176623a6f@redhat.com> Date: Wed, 29 Sep 2021 18:30:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29.09.21 18:25, Mike Rapoport wrote: > On Mon, Sep 27, 2021 at 05:05:16PM +0200, David Hildenbrand wrote: >> We want to specify flags when hotplugging memory. Let's prepare to pass >> flags to memblock_add_node() by adjusting all existing users. >> >> Note that when hotplugging memory the system is already up and running >> and we don't want to add the memory first and apply flags later: it >> should happen within one memblock call. > > Why is it important that the system is up and why it should happen in a > single call? > I don't mind adding flags parameter to memblock_add_node() but this > changelog does not really explain the reasons to do it. "After memblock_add_node(), we could race with anybody performing a search for MEMBLOCK_NONE, like kexec_file -- and that only happens once the system is already up and running. So we want both steps to happen atomically." I can add that to the patch description. (I think it still won't be completely atomic because memblock isn't properly implementing locking yet, but that's a different story) -- Thanks, David / dhildenb