All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Small cleanup for memoryhotplug
@ 2018-06-22 11:18 osalvador
  2018-06-22 11:18 ` [PATCH v2 1/4] mm/memory_hotplug: Make add_memory_resource use __try_online_node osalvador
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: osalvador @ 2018-06-22 11:18 UTC (permalink / raw)
  To: akpm
  Cc: mhocko, vbabka, pasha.tatashin, Jonathan.Cameron, arbab, linux-mm,
	linux-kernel, Oscar Salvador

From: Oscar Salvador <osalvador@suse.de>

Hi,

I this is a small cleanup for the memhotplug's code.
A lot more could be done, but it is better to start somewhere.
I tried to unify/remove duplicated code.

The following is what this patchset does:

1) add_memory_resource() has code to allocate a node in case it was offline.
   Since try_online_node has some code for that as well, I just made add_memory_resource() to
   use that so we can remove duplicated code..
   This is better explained in patch 1/4.

2) register_mem_sect_under_node() will be called only from link_mem_sections()

3) Make register_mem_sect_under_node() a callback of walk_memory_range()

4) Drop unnecessary checks from register_mem_sect_under_node()

I have done some tests and I could not see anything broken because of
this patchset.

Signed-off-by: Oscar Salvador <osalvador@suse.de>
Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Changes since v1:
- Address issues/suggestions in the provided feedback (Pavel Tatashin)
- Rebased

Oscar Salvador (4):
  mm/memory_hotplug: Make add_memory_resource use __try_online_node
  mm/memory_hotplug: Call register_mem_sect_under_node
  mm/memory_hotplug: Make register_mem_sect_under_node a cb of
    walk_memory_range
  mm/memory_hotplug: Drop unnecessary checks from
    register_mem_sect_under_node

 drivers/base/memory.c |  2 --
 drivers/base/node.c   | 49 ++++----------------------
 include/linux/node.h  | 12 ++++---
 mm/memory_hotplug.c   | 96 +++++++++++++++++++++++++--------------------------
 4 files changed, 60 insertions(+), 99 deletions(-)

-- 
2.13.6

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-08-16 17:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-22 11:18 [PATCH v2 0/4] Small cleanup for memoryhotplug osalvador
2018-06-22 11:18 ` [PATCH v2 1/4] mm/memory_hotplug: Make add_memory_resource use __try_online_node osalvador
2018-06-22 11:18 ` [PATCH v2 2/4] mm/memory_hotplug: Call register_mem_sect_under_node osalvador
2018-06-22 11:18 ` [PATCH v2 3/4] mm/memory_hotplug: Make register_mem_sect_under_node a cb of walk_memory_range osalvador
2018-08-15 22:21   ` Andrew Morton
2018-08-16  6:15     ` Oscar Salvador
2018-08-16 17:20   ` Pasha Tatashin
2018-06-22 11:18 ` [PATCH v2 4/4] mm/memory_hotplug: Drop unnecessary checks from register_mem_sect_under_node osalvador
2018-06-22 21:16 ` [PATCH v2 0/4] Small cleanup for memoryhotplug Reza Arbab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.