[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f6088e93-9cb6-08ee-ac89-8cab289dc460@redhat.com>
Date: Mon, 16 Mar 2020 16:34:06 +0100
From: David Hildenbrand <david@...hat.com>
To: Michal Hocko <mhocko@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linuxppc-dev@...ts.ozlabs.org, linux-hyperv@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Oscar Salvador <osalvador@...e.de>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Baoquan He <bhe@...hat.com>,
Wei Yang <richard.weiyang@...il.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v1 4/5] mm/memory_hotplug: convert memhp_auto_online to
store an online_type
On 16.03.20 16:24, Michal Hocko wrote:
> On Wed 11-03-20 13:30:25, David Hildenbrand wrote:
> [...]
>> diff --git a/arch/powerpc/platforms/powernv/memtrace.c b/arch/powerpc/platforms/powernv/memtrace.c
>> index d6d64f8718e6..e15a600cfa4d 100644
>> --- a/arch/powerpc/platforms/powernv/memtrace.c
>> +++ b/arch/powerpc/platforms/powernv/memtrace.c
>> @@ -235,7 +235,7 @@ static int memtrace_online(void)
>> * If kernel isn't compiled with the auto online option
>> * we need to online the memory ourselves.
>> */
>> - if (!memhp_auto_online) {
>> + if (memhp_default_online_type == MMOP_OFFLINE) {
>> lock_device_hotplug();
>> walk_memory_blocks(ent->start, ent->size, NULL,
>> online_mem_block);
>
> Whut? This stinks, doesn't it. For your defense, the original code is
> fishy already but this just makes it even more ugly.
PPC64 onlines all memory directly from the kernel, and not triggered by
user space (I think that's ugly and not desired, but it is what it is
and I am not going to touch that).
See
arch/powerpc/platforms/pseries/hotplug-memory.c:dlpar_change_lmb_state().
Best I can do here is to also always online all memory.
What are your suggestions?
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists