From: Andrew Morton <akpm@linux-foundation.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Alexander Beregalov <a.beregalov@gmail.com>,
"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-arch@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] build fix for generic debug pagealloc
Date: Thu, 2 Apr 2009 09:45:22 -0700 [thread overview]
Message-ID: <20090402094522.b29004c8.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090402163145.GA28728@localhost.localdomain>
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.
next prev parent reply other threads:[~2009-04-02 16:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 11:21 next-0402: build fails at mm/debug-pagealloc.c Alexander Beregalov
2009-04-02 11:21 ` Alexander Beregalov
2009-04-02 16:31 ` [PATCH] build fix for generic debug pagealloc Akinobu Mita
2009-04-02 16:31 ` Akinobu Mita
2009-04-02 16:45 ` Andrew Morton [this message]
2009-04-03 16:44 ` Ingo Molnar
2009-04-03 16:44 ` Ingo Molnar
2009-04-03 20:38 ` Rafael J. Wysocki
2009-04-08 13:05 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090402094522.b29004c8.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=a.beregalov@gmail.com \
--cc=akinobu.mita@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=schwidefsky@de.ibm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox