Skip to content

Fix kmalloc_node on offline nodes

Srikar Dronamraju linux-mm linuxppc-dev oe-kbuild-all 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 10 repliesIn review
  2. v14 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- Handled comments from Vlastimil Babka and Bharata B Rao
- Changes only in patch 2 and 4.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mm: Check for node_online in node_present_pagesinclude/linux/mmzone.h+4 -28 replies
2/4mm/slub: Use mem_node to allocate a new slabmm/slub.c+5 -40 replies
3/4mm: Implement reset_numa_meminclude/asm-generic/topology.h include/linux/topology.h+10 -02 replies
4/4powerpc/numa: Set fallback nodes for offline nodesarch/powerpc/include/asm/topology.h arch/powerpc/kernel/smp.c+17 -00 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchSachin Sant
1/4T-b
2/4T-b
3/4T-b
4/4T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] Fix kmalloc_node on offline nodes

Changelog v1 -> v2:
- Handled comments from Vlastimil Babka and Bharata B Rao
- Changes only in patch 2 and 4.

Sachin recently reported that linux-next was no more bootable on few powerpc systems.
https://lore.kernel.org/linux-next/[email protected]/

# numactl -H
available: 2 nodes (0-1)
node 0 cpus:
node 0 size: 0 MB
node 0 free: 0 MB
node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
node 1 size: 35247 MB
node 1 free: 30907 MB
node distances:
node   0   1
  0:  10  40
  1:  40  10
#

Sachin bisected the problem to Commit a75056fc1e7c ("mm/memcontrol.c: allocate shrinker_map on appropriate NUMA node")

The root cause analysis showed that mm/slub and powerpc/numa had some shortcomings with respect to offline nodes.

This patch series is on top of patches posted at
https://lore.kernel.org/linuxppc-dev/[email protected]/t/#u

Cc Andrew Morton <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Sachin Sant <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Christopher Lameter <[email protected]>
Cc Joonsoo Kim <[email protected]>
Cc Kirill Tkhai <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Srikar Dronamraju <[email protected]>
Cc Bharata B Rao <[email protected]>
Cc Nathan Lynch <[email protected]>

Srikar Dronamraju (4):
mm: Check for node_online in node_present_pages mm/slub: Use mem_node to allocate a new slab
mm: Implement reset_numa_mem
powerpc/numa: Set fallback nodes for offline nodes

 arch/powerpc/include/asm/topology.h | 16 ++++++++++++++++
 arch/powerpc/kernel/smp.c           |  1 +
 include/asm-generic/topology.h      |  3 +++
 include/linux/mmzone.h              |  6 ++++--
 include/linux/topology.h            |  7 +++++++
 mm/slub.c                           |  9 +++++----
 6 files changed, 36 insertions(+), 6 deletions(-)
Signature · 1 line
2.18.1