SLUB: kmem_cache_destroy doesn't - version 2.

From: Neil Brown
Date: Fri Apr 20 2007 - 00:29:24 EST



Hi again,
I recently noticed that my slub-enabled kernel won't let me stop
and restart the NFS server. It stops fine but on restart
it returns -ENOMEM.

It turns out that this is because kmem_cache_create is failing
because the name already exists in sysfs.

fs/nfsd/nfs4state creates 4 kmem_caches.
Two of them get shared:

/sys/slab/nfsd4_files -> ../slab/eventpoll_pwq
/sys/slab/nfsd4_stateids -> ../slab/kmalloc-128

When kmem_cache_destroy is called, the alias count is reduced
properly, but the alias symlink does not get removed. So when we
try to create those caches again, it fails.

Not sure how best to fix this one.... kmem_cache_destroy currently
doesn't know which alias is being destroyed.

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