Re: 2.6.25-rc8-mm2

From: Pekka Enberg
Date: Fri Apr 11 2008 - 10:24:26 EST


On Fri, 2008-04-11 at 22:17 +0900, KAMEZAWA Hiroyuki wrote:
> On Fri, 11 Apr 2008 20:17:24 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> > slab-2.6.git booted well :(
> > Hmm, It seems I have to dig somewhere different...
> >
> Sorry, I tested *master* branch ;), under *testing* branch it reproduced.
>
> bisected. (see below)
>
> I'm sorry I can't use my box for next 2 days. I can test possible fix
> on Monday (in Japan).
>
> ==bisect result==
> 831d78b552aade2c383cf8d75b180dd35f81a4e3 is first bad commit
> commit 831d78b552aade2c383cf8d75b180dd35f81a4e3
> Author: Christoph Lameter <clameter@xxxxxxx>
> Date: Tue Apr 8 22:26:30 2008 +0300
>
> SLUB: Add KICKABLE to avoid repeated kick() attempts
>
> Add a flag KICKABLE to be set on slabs with a defragmentation method
>
> Clear the flag if a kick action is not successful in reducing the
> number of objects in a slab. This will avoid future attempts to
> kick objects out.
>
> The KICKABLE flag is set again when all objects of the slab have been
> allocated (Occurs during removal of a slab from the partial lists).
>
> Reviewed-by: Rik van Riel <riel@xxxxxxxxxx>
> Signed-off-by: Christoph Lameter <clameter@xxxxxxx>
> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx>

My bad, sorry. Fixed and pushed out.

Pekka

>From 7c7e7e5e7ec07c0a47705b2d21c779c39ba02252 Mon Sep 17 00:00:00 2001
From: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
Date: Fri, 11 Apr 2008 17:17:43 +0300
Subject: [PATCH] slub: add missing slab_unlock() to __kmem_cache_shrink()

If page is not kickable, remember to slab_unlock() before continuing the loop.

Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
---
mm/slub.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 4b694a7..f09f1fb 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2926,8 +2926,10 @@ static unsigned long __kmem_cache_shrink(struct kmem_cache *s, int node,
continue;

if (page->inuse) {
- if (!SlabKickable(page))
+ if (!SlabKickable(page)) {
+ slab_unlock(page);
continue;
+ }

if (page->inuse * 100 >=
s->defrag_ratio * page->objects) {
--
1.5.2.5



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