+ mm-memory_hotplugc-move-register_memory_resource-out-of-the-lock_memory_hotplug.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + mm-memory_hotplugc-move-register_memory_resource-out-of-the-lock_memory_hotplug.patch added to -mm tree
To: nzimmer@xxxxxxx,hedi@xxxxxxx,isimatu.yasuaki@xxxxxxxxxxxxxx,kamezawa.hiroyu@xxxxxxxxxxxxxx,rafael.j.wysocki@xxxxxxxxx,tangchen@xxxxxxxxxxxxxx,travis@xxxxxxx,wency@xxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Tue, 14 Jan 2014 15:13:51 -0800


The patch titled
     Subject: mm/memory_hotplug.c: move register_memory_resource out of the lock_memory_hotplug
has been added to the -mm tree.  Its filename is
     mm-memory_hotplugc-move-register_memory_resource-out-of-the-lock_memory_hotplug.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-memory_hotplugc-move-register_memory_resource-out-of-the-lock_memory_hotplug.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-memory_hotplugc-move-register_memory_resource-out-of-the-lock_memory_hotplug.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Nathan Zimmer <nzimmer@xxxxxxx>
Subject: mm/memory_hotplug.c: move register_memory_resource out of the lock_memory_hotplug

We don't need to do register_memory_resource() since it has its own lock
and doesn't make any callbacks.

Also register_memory_resource return NULL on failure so we don't have
anything to cleanup at this point.

The reason for this rfc is I was doing some experiments with hotplugging
of memory on some of our larger systems.  While it seems to work, it can
be quite slow.  With some preliminary digging I found that
lock_memory_hotplug is clearly ripe for breakup.

It could be broken up per nid or something but it also covers the
online_page_callback.  The online_page_callback shouldn't be very hard to
break out.

Also there is the issue of various structures(wmarks come to mind) that are
only updated under the lock_memory_hotplug that would need to be dealt with.

Cc: Tang Chen <tangchen@xxxxxxxxxxxxxx>
Cc: Wen Congyang <wency@xxxxxxxxxxxxxx>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@xxxxxxxxxxxxxx>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx>
Cc: Hedi <hedi@xxxxxxx>
Cc: Mike Travis <travis@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/memory_hotplug.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff -puN mm/memory_hotplug.c~mm-memory_hotplugc-move-register_memory_resource-out-of-the-lock_memory_hotplug mm/memory_hotplug.c
--- a/mm/memory_hotplug.c~mm-memory_hotplugc-move-register_memory_resource-out-of-the-lock_memory_hotplug
+++ a/mm/memory_hotplug.c
@@ -1107,17 +1107,18 @@ int __ref add_memory(int nid, u64 start,
 	if (ret)
 		return ret;
 
-	lock_memory_hotplug();
-
 	res = register_memory_resource(start, size);
 	ret = -EEXIST;
 	if (!res)
-		goto out;
+		return ret;
 
 	{	/* Stupid hack to suppress address-never-null warning */
 		void *p = NODE_DATA(nid);
 		new_pgdat = !p;
 	}
+
+	lock_memory_hotplug();
+
 	new_node = !node_online(nid);
 	if (new_node) {
 		pgdat = hotadd_new_pgdat(nid, start);
_

Patches currently in -mm which might be from nzimmer@xxxxxxx are

mm-memory_hotplugc-move-register_memory_resource-out-of-the-lock_memory_hotplug.patch
mm-memory_hotplugc-register_memory_resource-fixes.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux