On Fri, Apr 25, 2008 at 12:36:33PM -0700, Christoph Lameter wrote:Yes. Appended. But it just enables the old NUMA VIRTUAL_BUG_ON()s, more work could be done e.g. by instrumenting pa/va and the non NUMA and i386 case too. -Andi --- Add CONFIG option to enable VIRTUAL_BUG_ON() VIRTUAL_BUG_ON was used in the early days of x86-64 NUMA to debug the virtual address to struct page code. Later it was noped, but the call kept intact. Add a CONFIG option to enable it as a BUG_ON again. This would have likely caught the recent text_poke bug. Signed-off-by: Andi Kleen <andi@firstfloor.org> Index: linux/arch/x86/Kconfig.debug =================================================================== --- linux.orig/arch/x86/Kconfig.debug +++ linux/arch/x86/Kconfig.debug @@ -245,4 +245,11 @@ config CPA_DEBUG help Do change_page_attr() self-tests every 30 seconds. +config DEBUG_VIRTUAL + bool "Virtual memory translation debugging" + depends on DEBUG_KERNEL && NUMA && X86_64 + help + Enable some costly sanity checks in the NUMA virtual to page + code. This can catch mistakes with virt_to_page() and friends. + endmenu Index: linux/include/asm-x86/mmzone_64.h =================================================================== --- linux.orig/include/asm-x86/mmzone_64.h +++ linux/include/asm-x86/mmzone_64.h @@ -7,7 +7,11 @@ #ifdef CONFIG_NUMA +#ifdef CONFIG_DEBUG_VIRTUAL +#define VIRTUAL_BUG_ON(x) BUG_ON(x) +#else #define VIRTUAL_BUG_ON(x) +#endif #include <asm/smp.h> --
| Alan Cox | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Bart Van Assche | Re: Integration of SCST in the mainstream Linux kernel |
| Andrew Morton | Re: [RFC/PATCH] Documentation of kernel messages |
git: | |
| Winkler, Tomas | RE: iwlwifi: fix build bug in "iwlwifi: fix LED stall" |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Mark Lord | Re: [BUG] New Kernel Bugs |
