From: bobijam Date: Wed, 4 Feb 2009 01:45:47 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_9_160~44 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=b5870e11384cb45fb6a7d8dfb7dc856ab4f751d6;p=fs%2Flustre-release.git Branch HEAD 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. --- diff --git a/libcfs/include/libcfs/user-mem.h b/libcfs/include/libcfs/user-mem.h index 701d8f8..ab501b8 100644 --- a/libcfs/include/libcfs/user-mem.h +++ b/libcfs/include/libcfs/user-mem.h @@ -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 diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index b56a42c..58875a9 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -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;