[RFC PATCH 1/2] mm, oom: dump meminfo for all memory nodes
From: Feng Tang
Date: Wed Nov 04 2020 - 01:19:54 EST
In some OOM cases, if there is memory node binding(current->mems_allowed
is not NULL), system may only print the meminfo for these bound nodes,
while other nodes' info could still be important for debugging.
For example on a platform with one normal node (has DMA/DMA32/NORMAL...
zones) and one node which only has movable zone (either for memory hotplug
case or a persistent memory node), some user will run docker while binding
memory to the movable node. many memory allocations originated from the
docker instance will fall back to the other node, and when a OOM happens,
meminfo for both nodes are needed.
So extend the show_mem() to cover all memory nodes.
Signed-off-by: Feng Tang <feng.tang@xxxxxxxxx>
---
mm/oom_kill.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 8b84661..601476cc 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -462,7 +462,7 @@ static void dump_header(struct oom_control *oc, struct task_struct *p)
if (is_memcg_oom(oc))
mem_cgroup_print_oom_meminfo(oc->memcg);
else {
- show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask);
+ show_mem(SHOW_MEM_FILTER_NODES, &node_states[N_MEMORY]);
if (is_dump_unreclaim_slabs())
dump_unreclaimable_slab();
}
--
2.7.4