All of lore.kernel.org
 help / color / mirror / Atom feed
* [to-be-updated] mm-update-_mem_id_-for-every-possible-cpu-when-memory-configuration-changes.patch removed from -mm tree
@ 2015-11-09 21:52 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2015-11-09 21:52 UTC (permalink / raw)
  To: jiang.liu, hpa, mgorman, mingo, peterz, rafael.j.wysocki,
	rientjes, tangchen, tglx, tj, tony.luck, umgwanakikbuti,
	mm-commits


The patch titled
     Subject: mm: update _mem_id_[] for every possible CPU when memory configuration changes
has been removed from the -mm tree.  Its filename was
     mm-update-_mem_id_-for-every-possible-cpu-when-memory-configuration-changes.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Jiang Liu <jiang.liu@linux.intel.com>
Subject: mm: update _mem_id_[] for every possible CPU when memory configuration changes

Current kernel only updates _mem_id_[cpu] for onlined CPUs when memory
configuration changes.  So kernel may allocate memory from remote node for
a CPU if the CPU is still in absent or offline state even if the node
associated with the CPU has already been onlined.  This patch tries to
improve performance by updating _mem_id_[cpu] for each possible CPU when
memory configuration changes, thus kernel could always allocate from local
node once the node is onlined.

We check node_online(cpu_to_node(cpu)) because:
1) local_memory_node(nid) needs to access NODE_DATA(nid)
2) try_offline_node(nid) just zeroes out NODE_DATA(nid) instead of free it

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_alloc.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff -puN mm/page_alloc.c~mm-update-_mem_id_-for-every-possible-cpu-when-memory-configuration-changes mm/page_alloc.c
--- a/mm/page_alloc.c~mm-update-_mem_id_-for-every-possible-cpu-when-memory-configuration-changes
+++ a/mm/page_alloc.c
@@ -4323,13 +4323,13 @@ static int __build_all_zonelists(void *d
 		/*
 		 * We now know the "local memory node" for each node--
 		 * i.e., the node of the first zone in the generic zonelist.
-		 * Set up numa_mem percpu variable for on-line cpus.  During
-		 * boot, only the boot cpu should be on-line;  we'll init the
-		 * secondary cpus' numa_mem as they come on-line.  During
-		 * node/memory hotplug, we'll fixup all on-line cpus.
+		 * Set up numa_mem percpu variable for all possible cpus
+		 * if associated node has been onlined.
 		 */
-		if (cpu_online(cpu))
+		if (node_online(cpu_to_node(cpu)))
 			set_cpu_numa_mem(cpu, local_memory_node(cpu_to_node(cpu)));
+		else
+			set_cpu_numa_mem(cpu, NUMA_NO_NODE);
 #endif
 	}
 
_

Patches currently in -mm which might be from jiang.liu@linux.intel.com are

mm-x86-enable-memoryless-node-support-to-better-support-cpu-memory-hotplug.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-09 21:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09 21:52 [to-be-updated] mm-update-_mem_id_-for-every-possible-cpu-when-memory-configuration-changes.patch removed from -mm tree akpm

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.