Re: [PATCH] mm,x86: remove debug_pagealloc_enabled

From: Stanislaw Gruszka
Date: Fri Nov 18 2011 - 07:50:26 EST


On Wed, Nov 16, 2011 at 04:43:52PM +0100, Stanislaw Gruszka wrote:
> When (no)bootmem finish operation, it pass pages to buddy allocator.
> Since debug_pagealloc_enabled is not set, we will do not protect pages,
> what is not what we want with CONFIG_DEBUG_PAGEALLOC=y.
>
> To fix remove debug_pagealloc_enabled. That variable was introduced by
> commit 12d6f21e "x86: do not PSE on CONFIG_DEBUG_PAGEALLOC=y" to get
> more CPA (change page attribude) code testing. But currently we have
> CONFIG_CPA_DEBUG, which test CPA.

Note this is more like fix than cleanup. Without patch, pages are not
protected until they are allocated and then freed again, what may
not happen if system is not used intensively.

If that patch can not be accepted, I think we should just go through
all free pages and mark then as not-presen in enable_debug_pagealloc()

Stanislaw
--
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/