* next-0402: build fails at mm/debug-pagealloc.c @ 2009-04-02 11:21 Alexander Beregalov 2009-04-02 16:31 ` [PATCH] build fix for generic debug pagealloc Akinobu Mita 0 siblings, 1 reply; 6+ messages in thread From: Alexander Beregalov @ 2009-04-02 11:21 UTC (permalink / raw) To: linux-next, Akinobu Mita, LKML, linux-arch mm/debug-pagealloc.c: In function 'set_page_poison': mm/debug-pagealloc.c:8: error: 'struct page' has no member named 'debug_flags' mm/debug-pagealloc.c: In function 'clear_page_poison': mm/debug-pagealloc.c:13: error: 'struct page' has no member named 'debug_flags' mm/debug-pagealloc.c: In function 'page_poison': mm/debug-pagealloc.c:18: error: 'struct page' has no member named 'debug_flags' mm/debug-pagealloc.c: At top level: mm/debug-pagealloc.c:120: error: redefinition of 'kernel_map_pages' include/linux/mm.h:1278: error: previous definition of 'kernel_map_pages' was here mm/debug-pagealloc.c: In function 'kernel_map_pages': mm/debug-pagealloc.c:122: error: 'debug_pagealloc_enabled' undeclared (first use in this function) Should debug_flags really be in vm_area_struct instead of `struct page` ? ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] build fix for generic debug pagealloc 2009-04-02 11:21 next-0402: build fails at mm/debug-pagealloc.c Alexander Beregalov @ 2009-04-02 16:31 ` Akinobu Mita 2009-04-02 16:45 ` Andrew Morton 0 siblings, 1 reply; 6+ messages in thread From: Akinobu Mita @ 2009-04-02 16:31 UTC (permalink / raw) To: Alexander Beregalov Cc: linux-next, LKML, linux-arch, David S. Miller, Benjamin Herrenschmidt, Paul Mackerras, Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, akpm > mm/debug-pagealloc.c: In function 'set_page_poison': > mm/debug-pagealloc.c:8: error: 'struct page' has no member named 'debug_flags' > mm/debug-pagealloc.c: In function 'clear_page_poison': > mm/debug-pagealloc.c:13: error: 'struct page' has no member named 'debug_flags' > mm/debug-pagealloc.c: In function 'page_poison': > mm/debug-pagealloc.c:18: error: 'struct page' has no member named 'debug_flags' > mm/debug-pagealloc.c: At top level: > mm/debug-pagealloc.c:120: error: redefinition of 'kernel_map_pages' > include/linux/mm.h:1278: error: previous definition of > 'kernel_map_pages' was here > mm/debug-pagealloc.c: In function 'kernel_map_pages': > mm/debug-pagealloc.c:122: error: 'debug_pagealloc_enabled' undeclared > (first use in this function) This patch fixes build failure with generic debug pagealloc: - debug_flags should be in struct page - define DEBUG_PAGEALLOC config option for all architectures Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Reported-by: Alexander Beregalov <a.beregalov@gmail.com> --- arch/powerpc/Kconfig.debug | 10 ---------- arch/s390/Kconfig.debug | 9 --------- arch/sparc/Kconfig.debug | 9 --------- arch/x86/Kconfig.debug | 9 --------- include/linux/mm_types.h | 6 +++--- mm/Kconfig.debug | 9 +++++++++ 6 files changed, 12 insertions(+), 40 deletions(-) diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index 6aa0b5e..a1098e2 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug @@ -27,16 +27,6 @@ config DEBUG_STACK_USAGE This option will slow down process creation somewhat. -config DEBUG_PAGEALLOC - bool "Debug page memory allocations" - depends on DEBUG_KERNEL && !HIBERNATION - depends on ARCH_SUPPORTS_DEBUG_PAGEALLOC - help - Unmap pages from the kernel linear mapping after free_pages(). - This results in a large slowdown, but helps to find certain types - of memory corruptions. - - config HCALL_STATS bool "Hypervisor call instrumentation" depends on PPC_PSERIES && DEBUG_FS diff --git a/arch/s390/Kconfig.debug b/arch/s390/Kconfig.debug index 7e297a3..2283933 100644 --- a/arch/s390/Kconfig.debug +++ b/arch/s390/Kconfig.debug @@ -6,13 +6,4 @@ config TRACE_IRQFLAGS_SUPPORT source "lib/Kconfig.debug" -config DEBUG_PAGEALLOC - bool "Debug page memory allocations" - depends on DEBUG_KERNEL - depends on ARCH_SUPPORTS_DEBUG_PAGEALLOC - help - Unmap pages from the kernel linear mapping after free_pages(). - This results in a slowdown, but helps to find certain types of - memory corruptions. - endmenu diff --git a/arch/sparc/Kconfig.debug b/arch/sparc/Kconfig.debug index d001b42..90d5fe2 100644 --- a/arch/sparc/Kconfig.debug +++ b/arch/sparc/Kconfig.debug @@ -22,15 +22,6 @@ config DEBUG_DCFLUSH config STACK_DEBUG bool "Stack Overflow Detection Support" -config DEBUG_PAGEALLOC - bool "Debug page memory allocations" - depends on DEBUG_KERNEL && !HIBERNATION - depends on ARCH_SUPPORTS_DEBUG_PAGEALLOC - help - Unmap pages from the kernel linear mapping after free_pages(). - This results in a large slowdown, but helps to find certain types - of memory corruptions. - config MCOUNT bool depends on SPARC64 diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index a345cb5..d8359e7 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -72,15 +72,6 @@ config DEBUG_STACK_USAGE This option will slow down process creation somewhat. -config DEBUG_PAGEALLOC - bool "Debug page memory allocations" - depends on DEBUG_KERNEL - depends on ARCH_SUPPORTS_DEBUG_PAGEALLOC - ---help--- - Unmap pages from the kernel linear mapping after free_pages(). - This results in a large slowdown, but helps to find certain types - of memory corruptions. - config DEBUG_PER_CPU_MAPS bool "Debug access to per_cpu maps" depends on DEBUG_KERNEL diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index ddadb4d..0e80e26 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -95,6 +95,9 @@ struct page { void *virtual; /* Kernel virtual address (NULL if not kmapped, ie. highmem) */ #endif /* WANT_PAGE_VIRTUAL */ +#ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS + unsigned long debug_flags; /* Use atomic bitops on this */ +#endif }; /* @@ -175,9 +178,6 @@ struct vm_area_struct { #ifdef CONFIG_NUMA struct mempolicy *vm_policy; /* NUMA policy for the VMA */ #endif -#ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS - unsigned long debug_flags; /* Use atomic bitops on this */ -#endif }; struct core_thread { diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug index c8d62d4..bb01e29 100644 --- a/mm/Kconfig.debug +++ b/mm/Kconfig.debug @@ -1,3 +1,12 @@ +config DEBUG_PAGEALLOC + bool "Debug page memory allocations" + depends on DEBUG_KERNEL && ARCH_SUPPORTS_DEBUG_PAGEALLOC + depends on !HIBERNATION || !PPC && !SPARC + ---help--- + Unmap pages from the kernel linear mapping after free_pages(). + This results in a large slowdown, but helps to find certain types + of memory corruptions. + config WANT_PAGE_DEBUG_FLAGS bool ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] build fix for generic debug pagealloc 2009-04-02 16:31 ` [PATCH] build fix for generic debug pagealloc Akinobu Mita @ 2009-04-02 16:45 ` Andrew Morton 2009-04-03 16:44 ` Ingo Molnar 0 siblings, 1 reply; 6+ messages in thread From: Andrew Morton @ 2009-04-02 16:45 UTC (permalink / raw) To: Akinobu Mita Cc: Alexander Beregalov, linux-next, LKML, linux-arch, David S. Miller, Benjamin Herrenschmidt, Paul Mackerras, Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar, H. Peter Anvin On Fri, 3 Apr 2009 01:31:52 +0900 Akinobu Mita <akinobu.mita@gmail.com> wrote: > > mm/debug-pagealloc.c: In function 'set_page_poison': > > mm/debug-pagealloc.c:8: error: 'struct page' has no member named 'debug_flags' > > mm/debug-pagealloc.c: In function 'clear_page_poison': > > mm/debug-pagealloc.c:13: error: 'struct page' has no member named 'debug_flags' > > mm/debug-pagealloc.c: In function 'page_poison': > > mm/debug-pagealloc.c:18: error: 'struct page' has no member named 'debug_flags' > > mm/debug-pagealloc.c: At top level: > > mm/debug-pagealloc.c:120: error: redefinition of 'kernel_map_pages' > > include/linux/mm.h:1278: error: previous definition of > > 'kernel_map_pages' was here > > mm/debug-pagealloc.c: In function 'kernel_map_pages': > > mm/debug-pagealloc.c:122: error: 'debug_pagealloc_enabled' undeclared > > (first use in this function) > > This patch fixes build failure with generic debug pagealloc: > > - debug_flags should be in struct page > - define DEBUG_PAGEALLOC config option for all architectures > > ... > > bool "Debug access to per_cpu maps" > depends on DEBUG_KERNEL > diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h > index ddadb4d..0e80e26 100644 > --- a/include/linux/mm_types.h > +++ b/include/linux/mm_types.h > @@ -95,6 +95,9 @@ struct page { > void *virtual; /* Kernel virtual address (NULL if > not kmapped, ie. highmem) */ > #endif /* WANT_PAGE_VIRTUAL */ > +#ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS > + unsigned long debug_flags; /* Use atomic bitops on this */ > +#endif > }; > > /* > @@ -175,9 +178,6 @@ struct vm_area_struct { > #ifdef CONFIG_NUMA > struct mempolicy *vm_policy; /* NUMA policy for the VMA */ > #endif > -#ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS > - unsigned long debug_flags; /* Use atomic bitops on this */ > -#endif > }; dammit. > struct core_thread { > diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug > index c8d62d4..bb01e29 100644 > --- a/mm/Kconfig.debug > +++ b/mm/Kconfig.debug > @@ -1,3 +1,12 @@ > +config DEBUG_PAGEALLOC > + bool "Debug page memory allocations" > + depends on DEBUG_KERNEL && ARCH_SUPPORTS_DEBUG_PAGEALLOC > + depends on !HIBERNATION || !PPC && !SPARC > + ---help--- > + Unmap pages from the kernel linear mapping after free_pages(). > + This results in a large slowdown, but helps to find certain types > + of memory corruptions. > + I guess this is why it wasn't discovered in my compile testing. It's quite regrettable that `make allmodconfig' didn't enable the feature. That's what allmodconfig is for. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] build fix for generic debug pagealloc 2009-04-02 16:45 ` Andrew Morton @ 2009-04-03 16:44 ` Ingo Molnar 2009-04-03 20:38 ` Rafael J. Wysocki 0 siblings, 1 reply; 6+ messages in thread From: Ingo Molnar @ 2009-04-03 16:44 UTC (permalink / raw) To: Andrew Morton, Rafael J. Wysocki Cc: Akinobu Mita, Alexander Beregalov, linux-next, LKML, linux-arch, David S. Miller, Benjamin Herrenschmidt, Paul Mackerras, Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar, H. Peter Anvin * Andrew Morton <akpm@linux-foundation.org> wrote: > > +config DEBUG_PAGEALLOC > > + bool "Debug page memory allocations" > > + depends on DEBUG_KERNEL && ARCH_SUPPORTS_DEBUG_PAGEALLOC > > + depends on !HIBERNATION || !PPC && !SPARC > > + ---help--- > > + Unmap pages from the kernel linear mapping after free_pages(). > > + This results in a large slowdown, but helps to find certain types > > + of memory corruptions. > > + > > I guess this is why it wasn't discovered in my compile testing. > It's quite regrettable that `make allmodconfig' didn't enable the > feature. That's what allmodconfig is for. Hm, i _do_ remember some hibernation magic fix from Rafael, in the area of debugalloc. Many months ago. Rafael, is it supposed to work? If yes, i think we should unblock it. Ingo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] build fix for generic debug pagealloc 2009-04-03 16:44 ` Ingo Molnar @ 2009-04-03 20:38 ` Rafael J. Wysocki 2009-04-08 13:05 ` Ingo Molnar 0 siblings, 1 reply; 6+ messages in thread From: Rafael J. Wysocki @ 2009-04-03 20:38 UTC (permalink / raw) To: Ingo Molnar Cc: Andrew Morton, Akinobu Mita, Alexander Beregalov, linux-next, LKML, linux-arch, David S. Miller, Benjamin Herrenschmidt, Paul Mackerras, Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar, H. Peter Anvin On Friday 03 April 2009, Ingo Molnar wrote: > > * Andrew Morton <akpm@linux-foundation.org> wrote: > > > > +config DEBUG_PAGEALLOC > > > + bool "Debug page memory allocations" > > > + depends on DEBUG_KERNEL && ARCH_SUPPORTS_DEBUG_PAGEALLOC > > > + depends on !HIBERNATION || !PPC && !SPARC > > > + ---help--- > > > + Unmap pages from the kernel linear mapping after free_pages(). > > > + This results in a large slowdown, but helps to find certain types > > > + of memory corruptions. > > > + > > > > I guess this is why it wasn't discovered in my compile testing. > > It's quite regrettable that `make allmodconfig' didn't enable the > > feature. That's what allmodconfig is for. > > Hm, i _do_ remember some hibernation magic fix from Rafael, in the > area of debugalloc. Many months ago. > > Rafael, is it supposed to work? If yes, i think we should unblock > it. Yes, it is, at least on x86. ISTR using DEBUG_PAGEALLOC with hibernation quite some time ago already. Thanks, Rafael ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] build fix for generic debug pagealloc 2009-04-03 20:38 ` Rafael J. Wysocki @ 2009-04-08 13:05 ` Ingo Molnar 0 siblings, 0 replies; 6+ messages in thread From: Ingo Molnar @ 2009-04-08 13:05 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Andrew Morton, Akinobu Mita, Alexander Beregalov, linux-next, LKML, linux-arch, David S. Miller, Benjamin Herrenschmidt, Paul Mackerras, Martin Schwidefsky, Heiko Carstens, Thomas Gleixner, Ingo Molnar, H. Peter Anvin * Rafael J. Wysocki <rjw@sisk.pl> wrote: > On Friday 03 April 2009, Ingo Molnar wrote: > > > > * Andrew Morton <akpm@linux-foundation.org> wrote: > > > > > > +config DEBUG_PAGEALLOC > > > > + bool "Debug page memory allocations" > > > > + depends on DEBUG_KERNEL && ARCH_SUPPORTS_DEBUG_PAGEALLOC > > > > + depends on !HIBERNATION || !PPC && !SPARC > > > > + ---help--- > > > > + Unmap pages from the kernel linear mapping after free_pages(). > > > > + This results in a large slowdown, but helps to find certain types > > > > + of memory corruptions. > > > > + > > > > > > I guess this is why it wasn't discovered in my compile testing. > > > It's quite regrettable that `make allmodconfig' didn't enable the > > > feature. That's what allmodconfig is for. > > > > Hm, i _do_ remember some hibernation magic fix from Rafael, in the > > area of debugalloc. Many months ago. > > > > Rafael, is it supposed to work? If yes, i think we should unblock > > it. > > Yes, it is, at least on x86. > > ISTR using DEBUG_PAGEALLOC with hibernation quite some time ago > already. Could you please send a patch to Andrew then to remove the above dependency? Ingo ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-04-08 13:05 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-04-02 11:21 next-0402: build fails at mm/debug-pagealloc.c Alexander Beregalov 2009-04-02 16:31 ` [PATCH] build fix for generic debug pagealloc Akinobu Mita 2009-04-02 16:45 ` Andrew Morton 2009-04-03 16:44 ` Ingo Molnar 2009-04-03 20:38 ` Rafael J. Wysocki 2009-04-08 13:05 ` Ingo Molnar
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).