lkml.org 
[lkml]   [2007]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch 11/23] SLUB: Slab defrag core
This was so far only in the slab defrag git tree.

From 8cc487b646e45da0644f432d7489ad8791164b5f Mon Sep 17 00:00:00 2001
From: Christoph Lameter <christoph@graphe.net>
Date: Tue, 6 Nov 2007 23:19:40 -0800
Subject: [PATCH] Fix two issues

1. Check inverted in kmem_cache_create

2. partial counter not decremented in __kmem_cache_shrink

Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
mm/slub.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 06fa4ed..de0557d 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2789,7 +2789,7 @@ static int kmem_cache_vacate(struct page *page, void *scratch)
BUG_ON(!PageSlab(page));
local_irq_save(flags);
state = slab_lock(page);
- BUG_ON(state & FROZEN);
+ BUG_ON(!(state & FROZEN));

s = page->slab;
map = scratch + max_defrag_slab_objects * sizeof(void **);
@@ -2902,6 +2902,7 @@ static unsigned long __kmem_cache_shrink(struct kmem_cache *s,

} else {
list_del(&page->lru);
+ n->nr_partial--;
slab_unlock(page, state);
discard_slab(s, page);
freed++;
--
1.5.3.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-07 23:17    [W:0.174 / U:2.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site