linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Small cleanup for memoryhotplug
@ 2018-06-01 12:53 osalvador
  2018-06-01 12:53 ` [PATCH 1/4] mm/memory_hotplug: Make add_memory_resource use __try_online_node osalvador
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: osalvador @ 2018-06-01 12:53 UTC (permalink / raw)
  To: akpm
  Cc: mhocko, vbabka, pasha.tatashin, linux-mm, linux-kernel, Oscar Salvador

From: Oscar Salvador <osalvador@suse.de>


Hi,

I wanted to give it a try and do a small cleanup in the memhotplug's code.
A lot more could be done, but I wanted 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) Get rid of link_mem_sections() in favour of walk_memory_range() with a callback to
   register_mem_sect_under_node()

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.

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: Get rid of link_mem_sections
  mm/memory_hotplug: Drop unnecessary checks from
    register_mem_sect_under_node

 drivers/base/memory.c |   2 -
 drivers/base/node.c   |  52 +++++---------------------
 include/linux/node.h  |  21 +++++------
 mm/memory_hotplug.c   | 101 ++++++++++++++++++++++++++------------------------
 4 files changed, 71 insertions(+), 105 deletions(-)

-- 
2.13.6

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

end of thread, other threads:[~2018-06-25 17:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-01 12:53 [PATCH 0/4] Small cleanup for memoryhotplug osalvador
2018-06-01 12:53 ` [PATCH 1/4] mm/memory_hotplug: Make add_memory_resource use __try_online_node osalvador
2018-06-07 10:48   ` Jonathan Cameron
2018-06-20 22:18   ` Andrew Morton
2018-06-21  1:41     ` Pavel Tatashin
2018-06-21  7:33       ` Oscar Salvador
2018-06-01 12:53 ` [PATCH 2/4] mm/memory_hotplug: Call register_mem_sect_under_node osalvador
2018-06-21  2:03   ` Pavel Tatashin
2018-06-01 12:53 ` [PATCH 3/4] mm/memory_hotplug: Get rid of link_mem_sections osalvador
2018-06-21  2:35   ` Pavel Tatashin
2018-06-25 17:04   ` Jonathan Cameron
2018-06-25 17:34     ` Oscar Salvador
2018-06-01 12:53 ` [PATCH 4/4] mm/memory_hotplug: Drop unnecessary checks from register_mem_sect_under_node osalvador
2018-06-21  2:38   ` Pavel Tatashin
2018-06-07 10:42 ` [PATCH 0/4] Small cleanup for memoryhotplug Jonathan Cameron
2018-06-07 13:32   ` Oscar Salvador
2018-06-18  7:13 ` Oscar Salvador
2018-06-21  8:32 ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox