[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+CK2bBLtZL8qxsjJt-tdaOraJCbDYfH2cbQ1ABJJ8hYif8LiQ@mail.gmail.com>
Date: Thu, 30 May 2019 17:07:05 -0400
From: Pavel Tatashin <pasha.tatashin@...een.com>
To: David Hildenbrand <david@...hat.com>
Cc: linux-mm <linux-mm@...ck.org>, LKML <linux-kernel@...r.kernel.org>,
linux-ia64@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-s390@...r.kernel.org, linux-sh@...r.kernel.org,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Dan Williams <dan.j.williams@...el.com>,
Wei Yang <richard.weiyang@...il.com>,
Igor Mammedov <imammedo@...hat.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
"mike.travis@....com" <mike.travis@....com>,
Ingo Molnar <mingo@...nel.org>,
Andrew Banman <andrew.banman@....com>,
Oscar Salvador <osalvador@...e.de>,
Michal Hocko <mhocko@...e.com>, Qian Cai <cai@....pw>,
Arun KS <arunks@...eaurora.org>,
Mathieu Malaterre <malat@...ian.org>
Subject: Re: [PATCH v3 07/11] mm/memory_hotplug: Create memory block devices
after arch_add_memory()
On Mon, May 27, 2019 at 7:12 AM David Hildenbrand <david@...hat.com> wrote:
>
> Only memory to be added to the buddy and to be onlined/offlined by
> user space using /sys/devices/system/memory/... needs (and should have!)
> memory block devices.
>
> Factor out creation of memory block devices. Create all devices after
> arch_add_memory() succeeded. We can later drop the want_memblock parameter,
> because it is now effectively stale.
>
> Only after memory block devices have been added, memory can be onlined
> by user space. This implies, that memory is not visible to user space at
> all before arch_add_memory() succeeded.
>
> While at it
> - use WARN_ON_ONCE instead of BUG_ON in moved unregister_memory()
> - introduce find_memory_block_by_id() to search via block id
> - Use find_memory_block_by_id() in init_memory_block() to catch
> duplicates
>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@...nel.org>
> Cc: David Hildenbrand <david@...hat.com>
> Cc: "mike.travis@....com" <mike.travis@....com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Andrew Banman <andrew.banman@....com>
> Cc: Oscar Salvador <osalvador@...e.de>
> Cc: Michal Hocko <mhocko@...e.com>
> Cc: Pavel Tatashin <pasha.tatashin@...een.com>
> Cc: Qian Cai <cai@....pw>
> Cc: Wei Yang <richard.weiyang@...il.com>
> Cc: Arun KS <arunks@...eaurora.org>
> Cc: Mathieu Malaterre <malat@...ian.org>
> Signed-off-by: David Hildenbrand <david@...hat.com>
LGTM
Reviewed-by: Pavel Tatashin <pasha.tatashin@...een.com>
Powered by blists - more mailing lists