Whamcloud - gitweb
LU-11518 ldlm: control lru_size for extent lock
[fs/lustre-release.git] / lustre / include / lustre_dlm.h
index 2c1e19c..f1071bd 100644 (file)
@@ -68,6 +68,7 @@ extern struct kset *ldlm_svc_kset;
  * client shows interest in that lock, e.g. glimpse is occured. */
 #define LDLM_DIRTY_AGE_LIMIT (10)
 #define LDLM_DEFAULT_PARALLEL_AST_LIMIT 1024
+#define LDLM_DEFAULT_LRU_SHRINK_BATCH (16)
 
 /**
  * LDLM non-error return states
@@ -443,6 +444,12 @@ struct ldlm_namespace {
         */
        unsigned int            ns_max_unused;
 
+       /**
+        * Cancel batch, if unused lock count exceed lru_size
+        * Only be used if LRUR disable.
+        */
+       unsigned int            ns_cancel_batch;
+
        /** Maximum allowed age (last used time) for locks in the LRU.  Set in
         * seconds from userspace, but stored in ns to avoid repeat conversions.
         */