Please sign in to comment.
mm: more intensive memory corruption debugging
With CONFIG_DEBUG_PAGEALLOC configured, the CPU will generate an exception on access (read,write) to an unallocated page, which permits us to catch code which corrupts memory. However the kernel is trying to maximise memory usage, hence there are usually few free pages in the system and buggy code usually corrupts some crucial data. This patch changes the buddy allocator to keep more free/protected pages and to interlace free/protected and allocated pages to increase the probability of catching corruption. When the kernel is compiled with CONFIG_DEBUG_PAGEALLOC, debug_guardpage_minorder defines the minimum order used by the page allocator to grant a request. The requested size will be returned with the remaining pages used as guard pages. The default value of debug_guardpage_minorder is zero: no change from current behaviour. [email@example.com: tweak documentation, s/flg/flag/] Signed-off-by: Stanislaw Gruszka <firstname.lastname@example.org> Cc: Mel Gorman <email@example.com> Cc: Andrea Arcangeli <firstname.lastname@example.org> Cc: "Rafael J. Wysocki" <email@example.com> Cc: Christoph Lameter <firstname.lastname@example.org> Cc: Pekka Enberg <email@example.com> Signed-off-by: Andrew Morton <firstname.lastname@example.org> Signed-off-by: Linus Torvalds <email@example.com>
- Loading branch information...
Showing with 113 additions and 7 deletions.