linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC Patch V1 00/30] Enable memoryless node on x86 platforms
@ 2014-07-11  7:37 Jiang Liu
  2014-07-11  7:37 ` [RFC Patch V1 01/30] mm, kernel: Use cpu_to_mem()/numa_mem_id() to support memoryless node Jiang Liu
                   ` (31 more replies)
  0 siblings, 32 replies; 90+ messages in thread
From: Jiang Liu @ 2014-07-11  7:37 UTC (permalink / raw)
  To: Andrew Morton, Mel Gorman, David Rientjes, Mike Galbraith,
	Peter Zijlstra, Rafael J . Wysocki
  Cc: Jiang Liu, Tony Luck, linux-mm, linux-hotplug, linux-kernel

Previously we have posted a patch fix a memory crash issue caused by
memoryless node on x86 platforms, please refer to
http://comments.gmane.org/gmane.linux.kernel/1687425

As suggested by David Rientjes, the most suitable fix for the issue
should be to use cpu_to_mem() rather than cpu_to_node() in the caller.
So this is the patchset according to David's suggestion.

Patch 1-26 prepare for enabling memoryless node on x86 platforms by
replacing cpu_to_node()/numa_node_id() with cpu_to_mem()/numa_mem_id().
Patch 27-29 enable support of memoryless node on x86 platforms.
Patch 30 tunes order to online NUMA node when doing CPU hot-addition.

This patchset fixes the issue mentioned by Mike Galbraith that CPUs
are associated with wrong node after adding memory to a memoryless
node.

With support of memoryless node enabled, it will correctly report system
hardware topology for nodes without memory installed.
root@bkd01sdp:~# numactl --hardware
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
node 0 size: 15725 MB
node 0 free: 15129 MB
node 1 cpus: 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
node 1 size: 15862 MB
node 1 free: 15627 MB
node 2 cpus: 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
node 2 size: 0 MB
node 2 free: 0 MB
node 3 cpus: 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
node 3 size: 0 MB
node 3 free: 0 MB
node distances:
node   0   1   2   3
  0:  10  21  21  21
  1:  21  10  21  21
  2:  21  21  10  21
  3:  21  21  21  10

With memoryless node enabled, CPUs are correctly associated with node 2
after memory hot-addition to node 2.
root@bkd01sdp:/sys/devices/system/node/node2# numactl --hardware
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
node 0 size: 15725 MB
node 0 free: 14872 MB
node 1 cpus: 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
node 1 size: 15862 MB
node 1 free: 15641 MB
node 2 cpus: 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
node 2 size: 128 MB
node 2 free: 127 MB
node 3 cpus: 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
node 3 size: 0 MB
node 3 free: 0 MB
node distances:
node   0   1   2   3
  0:  10  21  21  21
  1:  21  10  21  21
  2:  21  21  10  21
  3:  21  21  21  10

The patchset is based on the latest mainstream kernel and has been
tested on a 4-socket Intel platform with CPU/memory hot-addition
capability.

Any comments are welcomed!

Jiang Liu (30):
  mm, kernel: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, sched: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, net: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, netfilter: Use cpu_to_mem()/numa_mem_id() to support memoryless
    node
  mm, perf: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, tracing: Use cpu_to_mem()/numa_mem_id() to support memoryless
    node
  mm: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, thp: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, memcg: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, xfrm: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, char/mspec.c: Use cpu_to_mem()/numa_mem_id() to support
    memoryless node
  mm, IB/qib: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, i40e: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, i40evf: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, igb: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, ixgbe: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, intel_powerclamp: Use cpu_to_mem()/numa_mem_id() to support
    memoryless node
  mm, bnx2fc: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, bnx2i: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, fcoe: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, irqchip: Use cpu_to_mem()/numa_mem_id() to support memoryless
    node
  mm, of: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, x86: Use cpu_to_mem()/numa_mem_id() to support memoryless node
  mm, x86/platform/uv: Use cpu_to_mem()/numa_mem_id() to support
    memoryless node
  mm, x86, kvm: Use cpu_to_mem()/numa_mem_id() to support memoryless
    node
  mm, x86, perf: Use cpu_to_mem()/numa_mem_id() to support memoryless
    node
  x86, numa: Kill useless code to improve code readability
  mm: Update _mem_id_[] for every possible CPU when memory
    configuration changes
  mm, x86: Enable memoryless node support to better support CPU/memory
    hotplug
  x86, NUMA: Online node earlier when doing CPU hot-addition

 arch/x86/Kconfig                              |    3 ++
 arch/x86/kernel/acpi/boot.c                   |    6 ++-
 arch/x86/kernel/apic/io_apic.c                |   10 ++---
 arch/x86/kernel/cpu/perf_event_amd.c          |    2 +-
 arch/x86/kernel/cpu/perf_event_amd_uncore.c   |    2 +-
 arch/x86/kernel/cpu/perf_event_intel.c        |    2 +-
 arch/x86/kernel/cpu/perf_event_intel_ds.c     |    6 +--
 arch/x86/kernel/cpu/perf_event_intel_rapl.c   |    2 +-
 arch/x86/kernel/cpu/perf_event_intel_uncore.c |    2 +-
 arch/x86/kernel/devicetree.c                  |    2 +-
 arch/x86/kernel/irq_32.c                      |    4 +-
 arch/x86/kernel/smpboot.c                     |    2 +
 arch/x86/kvm/vmx.c                            |    2 +-
 arch/x86/mm/numa.c                            |   52 +++++++++++++++++--------
 arch/x86/platform/uv/tlb_uv.c                 |    2 +-
 arch/x86/platform/uv/uv_nmi.c                 |    3 +-
 arch/x86/platform/uv/uv_time.c                |    2 +-
 drivers/char/mspec.c                          |    2 +-
 drivers/infiniband/hw/qib/qib_file_ops.c      |    4 +-
 drivers/infiniband/hw/qib/qib_init.c          |    2 +-
 drivers/irqchip/irq-clps711x.c                |    2 +-
 drivers/irqchip/irq-gic.c                     |    2 +-
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   |    2 +-
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c |    2 +-
 drivers/net/ethernet/intel/igb/igb_main.c     |    4 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    4 +-
 drivers/of/base.c                             |    2 +-
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c             |    2 +-
 drivers/scsi/bnx2i/bnx2i_init.c               |    2 +-
 drivers/scsi/fcoe/fcoe.c                      |    2 +-
 drivers/thermal/intel_powerclamp.c            |    4 +-
 include/linux/gfp.h                           |    6 +--
 kernel/events/callchain.c                     |    2 +-
 kernel/events/core.c                          |    2 +-
 kernel/events/ring_buffer.c                   |    2 +-
 kernel/rcu/rcutorture.c                       |    2 +-
 kernel/sched/core.c                           |    8 ++--
 kernel/sched/deadline.c                       |    2 +-
 kernel/sched/fair.c                           |    4 +-
 kernel/sched/rt.c                             |    6 +--
 kernel/smp.c                                  |    2 +-
 kernel/smpboot.c                              |    2 +-
 kernel/taskstats.c                            |    2 +-
 kernel/timer.c                                |    2 +-
 kernel/trace/ring_buffer.c                    |   12 +++---
 kernel/trace/trace_uprobe.c                   |    2 +-
 mm/huge_memory.c                              |    6 +--
 mm/memcontrol.c                               |    2 +-
 mm/memory.c                                   |    2 +-
 mm/page_alloc.c                               |   10 ++---
 mm/percpu-vm.c                                |    2 +-
 mm/vmalloc.c                                  |    2 +-
 net/core/dev.c                                |    6 +--
 net/core/flow.c                               |    2 +-
 net/core/pktgen.c                             |   10 ++---
 net/core/sysctl_net_core.c                    |    2 +-
 net/netfilter/x_tables.c                      |    8 ++--
 net/xfrm/xfrm_ipcomp.c                        |    2 +-
 58 files changed, 139 insertions(+), 111 deletions(-)

-- 
1.7.10.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2014-08-18 23:30 UTC | newest]

Thread overview: 90+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-11  7:37 [RFC Patch V1 00/30] Enable memoryless node on x86 platforms Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 01/30] mm, kernel: Use cpu_to_mem()/numa_mem_id() to support memoryless node Jiang Liu
2014-07-11 15:14   ` Paul E. McKenney
2014-07-21 17:15     ` Nishanth Aravamudan
2014-07-21 17:33       ` Paul E. McKenney
2014-07-12 12:32   ` Jens Axboe
2014-07-11  7:37 ` [RFC Patch V1 02/30] mm, sched: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 03/30] mm, net: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 04/30] mm, netfilter: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 05/30] mm, perf: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 06/30] mm, tracing: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 07/30] mm: " Jiang Liu
2014-07-11 13:51   ` Christoph Lameter
2014-07-11 14:42   ` Tejun Heo
2014-07-11 15:13     ` Christoph Lameter
2014-07-11 15:21       ` Tejun Heo
2014-07-11 15:33         ` Tejun Heo
2014-07-11 15:55           ` Christoph Lameter
2014-07-11 15:58             ` Tejun Heo
2014-07-11 16:04               ` Christoph Lameter
2014-07-11 15:58         ` Christoph Lameter
2014-07-11 16:01           ` Tejun Heo
2014-07-11 16:19             ` Christoph Lameter
2014-07-11 16:24               ` Tejun Heo
2014-07-11 17:29                 ` Christoph Lameter
2014-07-11 18:28                   ` Tejun Heo
2014-07-11 19:11                     ` Christoph Lameter
2014-07-23  3:16                       ` Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 08/30] mm, thp: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 09/30] mm, memcg: " Jiang Liu
2014-07-18  7:36   ` Michal Hocko
2014-07-23  3:18     ` Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 10/30] mm, xfrm: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 11/30] mm, char/mspec.c: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 12/30] mm, IB/qib: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 13/30] mm, i40e: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 14/30] mm, i40evf: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 15/30] mm, igb: " Jiang Liu
2014-07-21 17:42   ` Nishanth Aravamudan
2014-07-21 19:53     ` Alexander Duyck
2014-07-21 21:09       ` Nishanth Aravamudan
2014-07-23  3:20         ` Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 16/30] mm, ixgbe: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 17/30] mm, intel_powerclamp: " Jiang Liu
2014-07-21 17:38   ` Nishanth Aravamudan
2014-07-11  7:37 ` [RFC Patch V1 18/30] mm, bnx2fc: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 19/30] mm, bnx2i: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 20/30] mm, fcoe: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 21/30] mm, irqchip: " Jiang Liu
2014-07-18 12:40   ` Jason Cooper
2014-07-23  3:47     ` Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 22/30] mm, of: " Jiang Liu
2014-07-21 17:52   ` Nishanth Aravamudan
2014-07-28 13:30     ` Grant Likely
2014-07-28 19:26       ` Nishanth Aravamudan
2014-07-11  7:37 ` [RFC Patch V1 23/30] mm, x86: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 24/30] mm, x86/platform/uv: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 25/30] mm, x86, kvm: " Jiang Liu
2014-07-11  7:44   ` Paolo Bonzini
2014-07-11  7:37 ` [RFC Patch V1 26/30] mm, x86, perf: " Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 27/30] x86, numa: Kill useless code to improve code readability Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 28/30] mm: Update _mem_id_[] for every possible CPU when memory configuration changes Jiang Liu
2014-07-21 17:47   ` Nishanth Aravamudan
2014-07-23  8:16     ` Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 29/30] mm, x86: Enable memoryless node support to better support CPU/memory hotplug Jiang Liu
2014-07-24 23:26   ` Nishanth Aravamudan
2014-07-25  1:41     ` Jiang Liu
2014-07-11  7:37 ` [RFC Patch V1 30/30] x86, NUMA: Online node earlier when doing CPU hot-addition Jiang Liu
2014-07-24 23:30   ` Nishanth Aravamudan
2014-07-25  1:43     ` Jiang Liu
2014-07-25  1:44     ` Jiang Liu
2014-07-11  8:29 ` [RFC Patch V1 00/30] Enable memoryless node on x86 platforms Peter Zijlstra
2014-07-11 15:33   ` Greg KH
2014-07-11 20:02     ` Dave Hansen
2014-07-11 20:20     ` Andi Kleen
2014-07-11 20:51       ` Peter Zijlstra
2014-07-11 21:58         ` Andi Kleen
2014-07-15  1:18         ` David Rientjes
2014-07-11 23:51       ` H. Peter Anvin
2014-07-11 22:40     ` Jiri Kosina
2014-07-15  1:19       ` David Rientjes
2014-07-18 17:48         ` Nish Aravamudan
2014-07-21 17:23 ` Nishanth Aravamudan
2014-07-21 17:41   ` Tony Luck
2014-07-21 17:57     ` Nishanth Aravamudan
2014-07-23  8:20       ` Jiang Liu
2014-07-24 23:32         ` Nishanth Aravamudan
2014-07-25  1:50           ` Jiang Liu
2014-08-18 23:30             ` Nishanth Aravamudan
2014-07-21 20:06     ` Peter Zijlstra

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