linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: osalvador@techadventures.net
To: linux-mm@kvack.org
Cc: mhocko@suse.com, vbabka@suse.cz, pasha.tatashin@oracle.com,
	akpm@linux-foundation.org
Subject: [RFC PATCH 0/3] Small cleanup for hotplugmem
Date: Mon, 28 May 2018 10:13:52 +0200	[thread overview]
Message-ID: <20180528081352.GA14293@techadventures.net> (raw)

From: Oscar Salvador <osalvador@suse.de>

Hi guys,

I wanted to give it a chance a do a small cleanup in the hotplug memory code.
A lot more could be done, but I wanted to start somewhere.
I tried to unify/remove duplicated code.

Here I have just done three things

1) add_memory_resource() had code to allocate a node in case it was offline.
   Since try_online_node already does that, I just made add_memory_resource() to
   use that function.
   This is better explained in patch 1/3.

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()

I am posting this as a RFC because I could not see that these patches break anything,
but expert eyes might see something that I am missing here.

Oscar Salvador (3):
  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

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

Signed-off-by: Oscar Salvador <osalvador@suse.de>

-- 
2.13.6

             reply	other threads:[~2018-05-28  8:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-28  8:13 osalvador [this message]
2018-06-01 11:25 ` [RFC PATCH 0/3] Small cleanup for hotplugmem Oscar Salvador
2018-06-01 13:08   ` Michal Hocko
2018-06-01 13:15     ` Oscar Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180528081352.GA14293@techadventures.net \
    --to=osalvador@techadventures.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).