summaryrefslogtreecommitdiffstats
path: root/fs/dlm/dlm_internal.h
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2011-10-26 15:24:55 -0500
committerDavid Teigland <teigland@redhat.com>2011-11-18 10:20:15 -0600
commit9beb3bf5a92bb8fc6503f844bf0772df29f14a02 (patch)
treec60963c27d0a93ae1f572e6fda9c090a4a702d4e /fs/dlm/dlm_internal.h
parentc3b92c8787367a8bb53d57d9789b558f1295cc96 (diff)
downloadop-kernel-dev-9beb3bf5a92bb8fc6503f844bf0772df29f14a02.zip
op-kernel-dev-9beb3bf5a92bb8fc6503f844bf0772df29f14a02.tar.gz
dlm: convert rsb list to rb_tree
Change the linked lists to rb_tree's in the rsb hash table to speed up searches. Slow rsb searches were having a large impact on gfs2 performance due to the large number of dlm locks gfs2 uses. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r--fs/dlm/dlm_internal.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index fe2860c..5685a9a 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -103,8 +103,8 @@ struct dlm_dirtable {
};
struct dlm_rsbtable {
- struct list_head list;
- struct list_head toss;
+ struct rb_root keep;
+ struct rb_root toss;
spinlock_t lock;
};
@@ -285,7 +285,10 @@ struct dlm_rsb {
unsigned long res_toss_time;
uint32_t res_first_lkid;
struct list_head res_lookup; /* lkbs waiting on first */
- struct list_head res_hashchain; /* rsbtbl */
+ union {
+ struct list_head res_hashchain;
+ struct rb_node res_hashnode; /* rsbtbl */
+ };
struct list_head res_grantqueue;
struct list_head res_convertqueue;
struct list_head res_waitqueue;
OpenPOWER on IntegriCloud