Manfred Spraul wrote:
>
> int __init cpucache_init(void)
> {
> struct list_head* p;
> + int i;
>
> down(&cache_chain_sem);
> g_cpucache_up = FULL;
>
> - p = &cache_cache.next;
> - do {
> + list_for_each(p, &cache_chain) {
> kmem_cache_t* cachep = list_entry(p, kmem_cache_t, next);
> enable_cpucache(cachep);
> p = cachep->next.next;
> - } while (p != &cache_cache.next);
> + }
You're only visiting every second member in this list walk.
I added the below diff which gets me to a login prompt. I need
to get another rollup out - I'll beat on the slab changes a bit
and include them if they look solid; otherwise I'll upload an
incremental diff for them.
--- 2.5.40/mm/slab.c~cpucache_init-fix Sat Oct 5 17:06:28 2002
+++ 2.5.40-akpm/mm/slab.c Sat Oct 5 17:06:28 2002
@@ -697,17 +697,14 @@ void __init kmem_cache_sizes_init(void)
int __init cpucache_init(void)
{
- struct list_head* p;
+ kmem_cache_t *cachep;
int i;
down(&cache_chain_sem);
g_cpucache_up = FULL;
- list_for_each(p, &cache_chain) {
- kmem_cache_t* cachep = list_entry(p, kmem_cache_t, next);
+ list_for_each_entry(cachep, &cache_chain, next)
enable_cpucache(cachep);
- p = cachep->next.next;
- }
/*
* Register the timers that return unneeded
.
-
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/
This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:00:52 EST