diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-01-10 18:07:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 19:30:43 -0500 |
commit | fc8d8620d39dbbaf412b1b9247d77d196d92adb9 (patch) | |
tree | aab70c3807026701f326bb8a88c81845da059d9b | |
parent | c6968e73b90c2a2fb9a32d4bad249f8f70f70125 (diff) |
slub: min order when debug_guardpage_minorder > 0
Disable slub debug facilities and allocate slabs at minimal order when
debug_guardpage_minorder > 0 to increase probability to catch random
memory corruption by cpu exception.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/slub.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3654,6 +3654,9 @@ void __init kmem_cache_init(void) | |||
3654 | struct kmem_cache *temp_kmem_cache_node; | 3654 | struct kmem_cache *temp_kmem_cache_node; |
3655 | unsigned long kmalloc_size; | 3655 | unsigned long kmalloc_size; |
3656 | 3656 | ||
3657 | if (debug_guardpage_minorder()) | ||
3658 | slub_max_order = 0; | ||
3659 | |||
3657 | kmem_size = offsetof(struct kmem_cache, node) + | 3660 | kmem_size = offsetof(struct kmem_cache, node) + |
3658 | nr_node_ids * sizeof(struct kmem_cache_node *); | 3661 | nr_node_ids * sizeof(struct kmem_cache_node *); |
3659 | 3662 | ||