[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 4 Apr 2019 18:33:09 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Oscar Salvador <osalvador@...e.de>
Cc: Robin Murphy <robin.murphy@....com>, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mm@...ck.org,
akpm@...ux-foundation.org, will.deacon@....com,
catalin.marinas@....com, mhocko@...e.com,
mgorman@...hsingularity.net, james.morse@....com,
mark.rutland@....com, cpandya@...eaurora.org,
arunks@...eaurora.org, dan.j.williams@...el.com,
logang@...tatee.com, pasha.tatashin@...cle.com, david@...hat.com,
cai@....pw, Steven Price <steven.price@....com>
Subject: Re: [PATCH 2/6] arm64/mm: Enable memory hot remove
On 04/04/2019 05:28 PM, Oscar Salvador wrote:
> On Thu, Apr 04, 2019 at 11:09:22AM +0530, Anshuman Khandual wrote:
>>> Do these need to be __meminit? AFAICS it's effectively redundant with the containing #ifdef, and removal feels like it's inherently a later-than-init thing anyway.
>>
>> I was confused here a bit but even X86 does exactly the same. All these functions
>> are still labeled __meminit and all wrapped under CONFIG_MEMORY_HOTPLUG. Is there
>> any concern to have __meminit here ?
>
> We do not really need it as long as the code is within #ifdef CONFIG_MEMORY_HOTPLUG.
> __meminit is being used when functions that are going to be need for hotplug need
> to stay around.
Makes sense.
>
> /* Used for MEMORY_HOTPLUG */
> #define __meminit __section(.meminit.text) __cold notrace \
> __latent_entropy
>
> #if defined(CONFIG_MEMORY_HOTPLUG)
> #define MEM_KEEP(sec) *(.mem##sec)
> #define MEM_DISCARD(sec)
> #else
> #define MEM_KEEP(sec)
> #define MEM_DISCARD(sec) *(.mem##sec)
> #endif
>
> So it is kind of redundant to have both.
> I will clean it up when reposting [1] and [2].
>
> [1] https://patchwork.kernel.org/patch/10875019/
> [2] https://patchwork.kernel.org/patch/10875021/
>
Sure. Will remove them from the proposed functions next time around.
Powered by blists - more mailing lists