Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1589044

Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

From Reza Arbab <arbab@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks
Date 2017-02-28 00:40 +0100
Message-ID <tfydB-Zv-29@gated-at.bofh.it> (permalink)
References <tfqpI-45z-19@gated-at.bofh.it>
Organization IBM Linux Technology Center

Show all headers | View raw


On Mon, Feb 27, 2017 at 10:28:17AM +0100, Michal Hocko wrote: 
>diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
>index 134a2f69c21a..a72f7f64ee26 100644
>--- a/include/linux/memory_hotplug.h
>+++ b/include/linux/memory_hotplug.h
>@@ -100,8 +100,6 @@ extern void __online_page_free(struct page *page);
>
> extern int try_online_node(int nid);
>
>-extern bool memhp_auto_online;
>-
> #ifdef CONFIG_MEMORY_HOTREMOVE
> extern bool is_pageblock_removable_nolock(struct page *page);
> extern int arch_remove_memory(u64 start, u64 size);
>@@ -272,7 +270,7 @@ static inline void remove_memory(int nid, u64 start, u64 size) {}
>
> extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn,
> 		void *arg, int (*func)(struct memory_block *, void *));
>-extern int add_memory(int nid, u64 start, u64 size);
>+extern int add_memory(int nid, u64 start, u64 size, bool online);
> extern int add_memory_resource(int nid, struct resource *resource, bool online);
> extern int zone_for_memory(int nid, u64 start, u64 size, int zone_default,
> 		bool for_device);

It would be nice if instead of a 'bool online' argument, add_memory() 
and add_memory_resource() took an 'int online_type', ala online_pages().

That way we could specify offline, online, online+movable, etc.

-- 
Reza Arbab

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH] mm, hotplug: get rid of auto_online_blocks Michal Hocko <mhocko@kernel.org> - 2017-02-27 11:10 +0100
  Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-02-27 11:10 +0100
    Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Michal Hocko <mhocko@kernel.org> - 2017-02-27 11:40 +0100
      Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-02-27 12:00 +0100
        Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-02-27 14:20 +0100
        Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Michal Hocko <mhocko@kernel.org> - 2017-02-27 16:30 +0100
    Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-02-27 12:30 +0100
      Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-02-27 13:00 +0100
      Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Michal Hocko <mhocko@kernel.org> - 2017-02-27 16:50 +0100
        Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-02-28 14:40 +0100
  Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Michal Hocko <mhocko@kernel.org> - 2017-02-27 19:30 +0100
  Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Reza Arbab <arbab@linux.vnet.ibm.com> - 2017-02-28 00:40 +0100

csiph-web