linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch 18/87] mm: SLUB fix reclaim_state
       [not found] ` <20090609094451.GA26439@kroah.com>
@ 2009-06-09  9:39   ` Greg KH
  0 siblings, 0 replies; only message in thread
From: Greg KH @ 2009-06-09  9:39 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, linux-mm, Matt Mackall, Christoph Lameter, Nick Piggin,
	Pekka Enberg, Greg Kroah-Hartman

[-- Attachment #1: mm-slub-fix-reclaim_state.patch --]
[-- Type: text/plain, Size: 1323 bytes --]

2.6.29-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Nick Piggin <npiggin@suse.de>

commit 1eb5ac6466d4be7b15b38ce3ab709600f1bc891f upstream.

SLUB does not correctly account reclaim_state.reclaimed_slab, so it will
break memory reclaim. Account it like SLAB does.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 mm/slub.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/mm/slub.c
+++ b/mm/slub.c
@@ -9,6 +9,7 @@
  */
 
 #include <linux/mm.h>
+#include <linux/swap.h> /* struct reclaim_state */
 #include <linux/module.h>
 #include <linux/bit_spinlock.h>
 #include <linux/interrupt.h>
@@ -1175,6 +1176,8 @@ static void __free_slab(struct kmem_cach
 
 	__ClearPageSlab(page);
 	reset_page_mapcount(page);
+	if (current->reclaim_state)
+		current->reclaim_state->reclaimed_slab += pages;
 	__free_pages(page, order);
 }
 


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-09  9:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20090609093848.204935043@blue.kroah.org>
     [not found] ` <20090609094451.GA26439@kroah.com>
2009-06-09  9:39   ` [patch 18/87] mm: SLUB fix reclaim_state Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox