From c317139c3cb461646d30b5950090512e71c2d90d Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 3 Oct 2007 20:42:46 -0700 Subject: vcompound: slub: Use for buffer to correlate allocation addresses The caller table can get quite large if there are many call sites for a particular slab. Using a virtual compound page allows fallback to vmalloc in case the caller table gets too big and memory is fragmented. Currently we would fail the operation. Signed-off-by: Christoph Lameter --- mm/slub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: linux-2.6.25-rc8-mm2/mm/slub.c =================================================================== --- linux-2.6.25-rc8-mm2.orig/mm/slub.c 2008-04-11 20:19:45.000000000 -0700 +++ linux-2.6.25-rc8-mm2/mm/slub.c 2008-04-11 20:23:48.000000000 -0700 @@ -23,6 +23,7 @@ #include #include #include +#include /* * Lock order: @@ -3644,8 +3645,7 @@ struct loc_track { static void free_loc_track(struct loc_track *t) { if (t->max) - free_pages((unsigned long)t->loc, - get_order(sizeof(struct location) * t->max)); + __free_vcompound(t->loc); } static int alloc_loc_track(struct loc_track *t, unsigned long max, gfp_t flags) @@ -3655,7 +3655,7 @@ static int alloc_loc_track(struct loc_tr order = get_order(sizeof(struct location) * max); - l = (void *)__get_free_pages(flags, order); + l = __alloc_vcompound(flags, order); if (!l) return 0;