diff options
author | Nick Piggin <npiggin@suse.de> | 2009-05-05 05:13:44 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-05-06 03:23:02 -0400 |
commit | 1eb5ac6466d4be7b15b38ce3ab709600f1bc891f (patch) | |
tree | f10c11cb78e8b4716fe4c98d1fa838a7cd19e9b0 | |
parent | ce8a7424d23a36f043d0de8484f888971c831119 (diff) |
mm: SLUB fix reclaim_state
SLUB does not correctly account reclaim_state.reclaimed_slab, so it will
break memory reclaim. Account it like SLAB does.
Cc: stable@kernel.org
Cc: linux-mm@kvack.org
Cc: Matt Mackall <mpm@selenic.com>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
-rw-r--r-- | mm/slub.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <linux/swap.h> /* struct reclaim_state */ | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/bit_spinlock.h> | 14 | #include <linux/bit_spinlock.h> |
14 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
@@ -1170,6 +1171,8 @@ static void __free_slab(struct kmem_cache *s, struct page *page) | |||
1170 | 1171 | ||
1171 | __ClearPageSlab(page); | 1172 | __ClearPageSlab(page); |
1172 | reset_page_mapcount(page); | 1173 | reset_page_mapcount(page); |
1174 | if (current->reclaim_state) | ||
1175 | current->reclaim_state->reclaimed_slab += pages; | ||
1173 | __free_pages(page, order); | 1176 | __free_pages(page, order); |
1174 | } | 1177 | } |
1175 | 1178 | ||