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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FDB1C433F5 for ; Wed, 29 Sep 2021 16:30:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CFFBB61452 for ; Wed, 29 Sep 2021 16:30:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CFFBB61452 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 69C0F940041; Wed, 29 Sep 2021 12:30:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6258594003A; Wed, 29 Sep 2021 12:30:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 49F0A940041; Wed, 29 Sep 2021 12:30:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0189.hostedemail.com [216.40.44.189]) by kanga.kvack.org (Postfix) with ESMTP id 39B1494003A for ; Wed, 29 Sep 2021 12:30:17 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E179939B3B for ; Wed, 29 Sep 2021 16:30:16 +0000 (UTC) X-FDA: 78641148432.14.DB92D56 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf16.hostedemail.com (Postfix) with ESMTP id 76279F00009E for ; Wed, 29 Sep 2021 16:30:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632933015; 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=Pdzg9T1tI9ci2iyhlWUX3+YNs3RXSfAaYKkLJNlKkiodLHrzvAXcQ4lZ1v/kxaHlWCsG/H CMT8rwGuPo8YHZr/r2AcHyp3DKYmkrIHDDbwzRKunj5hzOY96aA1CeWFnCPt+X56KXbKhx ROl611PS24O+l1uFJem7buE2ryOr8KM= 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-460-5VVuVHSvP8uqPZqP9qcg8A-1; Wed, 29 Sep 2021 12:30:12 -0400 X-MC-Unique: 5VVuVHSvP8uqPZqP9qcg8A-1 Received: by mail-wm1-f69.google.com with SMTP id r2-20020a7bc082000000b0030d2ab5c3a7so41928wmh.1 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=01Qaf4BN1ii4fFSN33ax63jnprgnpK5yrxb0P1YNCAajgA2QPn31dYazQwbthpviF2 28H8watFKU9Mt4eTmOASUKrq2dJgVJSgUXtXeMYVkaWbexUWVCTz4dp8HTVxSvZrFoKI 3IGAKQGKbhKGm+/8hjv77PsJz3Ein92hctpKoR5CF0AXVgAhJKHgNZgnt9sUQFeKVIO6 LyXIw95G2Gi63bp1hZbTezq2yDkDqn5iR/imyFILbNHFPhSXF+ETfqXjhrwNia+ZJRwH AHJFv7nGYMGdOCH6TMnmzx5ubB9Knd0ao98hWrlvAjd8wxEhZIRMvEpa43tP3fWTHQmC nHaA== X-Gm-Message-State: AOAM530I0yDS9/OK7NIoGiBndDtkyEsE6UANxPCOI1T+vakm5vqzKgdo 9NHhP7OzoH5kCurcfKv02iLjAacuC9ccjUi9lAXkq2OL+482mdqmZZY9/CevCY+lSOcUVcLjtcm cJKzxNmzpKGk= X-Received: by 2002:a05:6000:184c:: with SMTP id c12mr1026253wri.150.1632933011561; Wed, 29 Sep 2021 09:30:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWpbhPpbSmBcJNqivlDLJZ/UTUefLQTk4gKa/CcEn6HHHOoDfx1bOgZbQtRoI/dHj6OAlJWg== 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: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 76279F00009E X-Stat-Signature: dhcezhkbhze64i4p17nka5d8czxgsfnd Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Pdzg9T1t; spf=none (imf16.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam06 X-HE-Tag: 1632933016-525813 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 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