[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7b614485-fe2d-9167-dfc9-d6affdb28c88@arm.com>
Date: Mon, 19 Oct 2020 12:26:36 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: David Hildenbrand <david@...hat.com>,
Sudarshan Rajagopalan <sudaraja@...eaurora.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Gavin Shan <gshan@...hat.com>,
Logan Gunthorpe <logang@...tatee.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Steven Price <steven.price@....com>,
Suren Baghdasaryan <surenb@...gle.com>
Subject: Re: [PATCH 2/2] arm64: allow hotpluggable sections to be offlined
On 10/17/2020 01:04 PM, David Hildenbrand wrote:
>
>> Am 17.10.2020 um 04:03 schrieb Sudarshan Rajagopalan <sudaraja@...eaurora.org>:
>>
>> On receiving the MEM_GOING_OFFLINE notification, we disallow offlining of
>> any boot memory by checking if section_early or not. With the introduction
>> of SECTION_MARK_HOTPLUGGABLE, allow boot mem sections that are marked as
>> hotpluggable with this bit set to be offlined and removed. This now allows
>> certain boot mem sections to be offlined.
>>
>
> The check (notifier) is in arm64 code. I don‘t see why you cannot make such decisions completely in arm64 code? Why would you have to mark sections?
>
> Also, I think I am missing from *where* the code that marks sections removable is even called? Who makes such decisions?
>From the previous patch.
+EXPORT_SYMBOL_GPL(mark_memory_hotpluggable);
>
> This feels wrong.
>
>> Signed-off-by: Sudarshan Rajagopalan <sudaraja@...eaurora.org>
>> Cc: Catalin Marinas <catalin.marinas@....com>
>> Cc: Will Deacon <will@...nel.org>
>> Cc: Anshuman Khandual <anshuman.khandual@....com>
>> Cc: Mark Rutland <mark.rutland@....com>
>> Cc: Gavin Shan <gshan@...hat.com>
>> Cc: Logan Gunthorpe <logang@...tatee.com>
>> Cc: David Hildenbrand <david@...hat.com>
>> Cc: Andrew Morton <akpm@...ux-foundation.org>
>> Cc: Steven Price <steven.price@....com>
>> Cc: Suren Baghdasaryan <surenb@...gle.com>
>> ---
>> arch/arm64/mm/mmu.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
>> index 75df62fea1b6..fb8878698672 100644
>> --- a/arch/arm64/mm/mmu.c
>> +++ b/arch/arm64/mm/mmu.c
>> @@ -1487,7 +1487,7 @@ static int prevent_bootmem_remove_notifier(struct notifier_block *nb,
>>
>> for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
>> ms = __pfn_to_section(pfn);
>> - if (early_section(ms))
>> + if (early_section(ms) && !removable_section(ms))
Till challenges related to boot memory removal on arm64 platform get
resolved, no portion of boot memory can be offlined. Let alone via a
driver making such decisions.
>> return NOTIFY_BAD;
>> }
>> return NOTIFY_OK;
>> --
>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
>> a Linux Foundation Collaborative Project
>>
>
>
Powered by blists - more mailing lists