[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181123130043.GM8625@dhcp22.suse.cz>
Date: Fri, 23 Nov 2018 14:00:43 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Oscar Salvador <osalvador@...e.com>
Cc: linux-mm@...ck.org, david@...hat.com, rppt@...ux.vnet.ibm.com,
akpm@...ux-foundation.org, arunks@...eaurora.org, bhe@...hat.com,
dan.j.williams@...el.com, Pavel.Tatashin@...rosoft.com,
Jonathan.Cameron@...wei.com, jglisse@...hat.com,
linux-kernel@...r.kernel.org, Oscar Salvador <osalvador@...e.de>,
Alexander Duyck <alexander.h.duyck@...ux.intel.com>
Subject: Re: [RFC PATCH 2/4] mm, memory_hotplug: provide a more generic
restrictions for memory hotplug
[Cc Alexander - email thread starts http://lkml.kernel.org/r/20181116101222.16581-1-osalvador@suse.com]
On Fri 16-11-18 11:12:20, Oscar Salvador wrote:
> From: Michal Hocko <mhocko@...e.com>
>
> arch_add_memory, __add_pages take a want_memblock which controls whether
> the newly added memory should get the sysfs memblock user API (e.g.
> ZONE_DEVICE users do not want/need this interface). Some callers even
> want to control where do we allocate the memmap from by configuring
> altmap. This is currently done quite ugly by searching for altmap down
> in memory hotplug (to_vmem_altmap). It should be the caller to provide
> the altmap down the call chain.
>
> Add a more generic hotplug context for arch_add_memory and __add_pages.
> struct mhp_restrictions contains flags which contains additional
> features to be enabled by the memory hotplug (MHP_MEMBLOCK_API
> currently) and altmap for alternative memmap allocator.
One note here as well. In the retrospect the API I have come up
with here is quite hackish. Considering the recent discussion about
special needs ZONE_DEVICE has for both initialization and struct page
allocations with Alexander Duyck I believe we wanted a more abstracted
API with allocator and constructor callbacks. This would allow different
usecases to fine tune their needs without specialcasing deep in the core
hotplug code paths.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists