[PATCH v1 2/4] memblock: allow to specify flags with memblock_add_node()
David Hildenbrand
david at redhat.com
Wed Sep 29 09:30:09 PDT 2021
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
More information about the linux-snps-arc
mailing list