Re: [patch 3/3] NUMA slab locking fixes -- fix cpu down and uplocking

From: Andrew Morton
Date: Sat Feb 04 2006 - 05:04:08 EST


Andrew Morton <akpm@xxxxxxxx> wrote:
>
> Cleanup patch below.

After which we need to address this:

mm/slab.c: In function `cpuup_callback':
mm/slab.c:959: warning: `alien' might be used uninitialized in this function

I guess it won't cause crashes, but it makes me wonder if this was tested
on non-NUMA?

Is this right?

--- devel/mm/slab.c~numa-slab-locking-fixes-fix-cpu-down-and-up-locking-fix 2006-02-04 02:01:44.000000000 -0800
+++ devel-akpm/mm/slab.c 2006-02-04 02:01:44.000000000 -0800
@@ -901,8 +901,11 @@ static void drain_alien_cache(struct kme
}
#else
#define alloc_alien_cache(node, limit) do { } while (0)
-#define free_alien_cache(ac_ptr) do { } while (0)
#define drain_alien_cache(cachep, alien) do { } while (0)
+
+static inline void free_alien_cache(struct array_cache **ac_ptr)
+{
+}
#endif

static int __devinit cpuup_callback(struct notifier_block *nfb,
@@ -986,10 +989,12 @@ static int __devinit cpuup_callback(stru
l3->shared = shared;
shared = NULL;
}
+#ifdef CONFIG_NUMA
if (!l3->alien) {
l3->alien = alien;
alien = NULL;
}
+#endif
spin_unlock_irq(&l3->list_lock);

kfree(shared);
_

-
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/