[PATCH] slub Discard slab page only when node partials > minimum setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unfreeze_partials may try to discard slab page, the discarding condition
should be 'when node partials number > minimum partial number setting',
not '<' in current code.

This patch base on penberg's tree's 'slub/partial' head. 

git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6.git 

Signed-off-by: Alex Shi <alex.shi@xxxxxxxxx>

---
 mm/slub.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index b351480..66a5b29 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1954,7 +1954,7 @@ static void unfreeze_partials(struct kmem_cache *s)
 
 			new.frozen = 0;
 
-			if (!new.inuse && (!n || n->nr_partial < s->min_partial))
+			if (!new.inuse && (!n || n->nr_partial > s->min_partial))
 				m = M_FREE;
 			else {
 				struct kmem_cache_node *n2 = get_node(s,
-- 
1.7.0



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]