|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCHv3 01/10] mm: memory hotplug with an existing resource
On 08/14/2015 04:40 AM, Andrew Morton wrote: On Thu, 13 Aug 2015 11:21:43 +0100 David Vrabel <david.vrabel@xxxxxxxxxx> wrote:On 30/07/15 18:03, David Vrabel wrote:Add add_memory_resource() to add memory using an existing "System RAM" resource. This is useful if the memory region is being located by finding a free resource slot with allocate_resource(). Xen guests will make use of this in their balloon driver to hotplug arbitrary amounts of memory in response to toolstack requests.Ping? This enables a useful feature for Xen guests.Looks OK to me. I've cc'ed some memory_hotplug.c developers. If they're OK with it, please add the patch to the (Xen?) tree which uses it. Add add_memory_resource() to add memory using an existing "System RAM" resource. This is useful if the memory region is being located by finding a free resource slot with allocate_resource(). Xen guests will make use of this in their balloon driver to hotplug arbitrary amounts of memory in response to toolstack requests. Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/memory_hotplug.h | 2 ++ mm/memory_hotplug.c | 28 +++++++++++++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 6ffa0ac..c76d371 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h @@ -11,6 +11,7 @@ struct zone; struct pglist_data; struct mem_section; struct memory_block; +struct resource;#ifdef CONFIG_MEMORY_HOTPLUG @@ -266,6 +267,7 @@ static inline void remove_memory(int nid, u64 start, u64 size) {} Not a big deal, but I think "if (ret)" is enough. The code looks good. Reviewed-by: Tang Chen <tangchen@xxxxxxxxxxxxxx> Thanks. + release_memory_resource(res); + return ret; +} EXPORT_SYMBOL_GPL(add_memory);#ifdef CONFIG_MEMORY_HOTREMOVE _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |