Whamcloud - gitweb
Branch HEAD
authorbobijam <bobijam>
Wed, 4 Feb 2009 01:45:47 +0000 (01:45 +0000)
committerbobijam <bobijam>
Wed, 4 Feb 2009 01:45:47 +0000 (01:45 +0000)
b=18015
i=johann
i=sheng.yang

add SLAB_DESTROY_BY_RCU to ldlm_lock_slab's flags for ldlm_locks are freed
with RCU mechanism.

libcfs/include/libcfs/user-mem.h
lustre/ldlm/ldlm_lockd.c

index 701d8f8..ab501b8 100644 (file)
@@ -78,6 +78,7 @@ typedef struct {
 } cfs_mem_cache_t;
 
 #define SLAB_HWCACHE_ALIGN 0
+#define SLAB_DESTROY_BY_RCU 0
 #define SLAB_KERNEL 0
 #define SLAB_NOFS 0
 
index b56a42c..58875a9 100644 (file)
@@ -2435,8 +2435,8 @@ int __init ldlm_init(void)
                 return -ENOMEM;
 
         ldlm_lock_slab = cfs_mem_cache_create("ldlm_locks",
-                                           sizeof(struct ldlm_lock), 0,
-                                           SLAB_HWCACHE_ALIGN);
+                                      sizeof(struct ldlm_lock), 0,
+                                      SLAB_HWCACHE_ALIGN | SLAB_DESTROY_BY_RCU);
         if (ldlm_lock_slab == NULL) {
                 cfs_mem_cache_destroy(ldlm_resource_slab);
                 return -ENOMEM;