Re: [PATCH 2/3] mm: introduce VM_BUG_ON_MM

From: Chris Metcalf
Date: Wed Sep 24 2014 - 13:04:41 EST


On 9/6/2014 3:40 PM, Sasha Levin wrote:
Very similar to VM_BUG_ON_PAGE and VM_BUG_ON_VMA, dump struct_mm
when the bug is hit.

Signed-off-by: Sasha Levin <sasha.levin@xxxxxxxxxx>
---
include/linux/mmdebug.h | 10 +++++++
mm/debug.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 79 insertions(+)

[...]
diff --git a/mm/debug.c b/mm/debug.c
index c19af12..8418893 100644
--- a/mm/debug.c
+++ b/mm/debug.c
+#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
+ "tlb_flush_pending %d\n",
+#endif

Putting the comma that separates the format string from the arguments
inside an ifdef means that if you don't build with NUMA_BALANCING or
COMPACTION you get a compile error. Perhaps this instead:

+#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
+ "tlb_flush_pending %d\n"
+#endif
- mm, mm->mmap, mm->vmacache_seqnum, mm->task_size,
+ , mm, mm->mmap, mm->vmacache_seqnum, mm->task_size,

--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/