diff options
author | Bob Peterson <rpeterso@redhat.com> | 2011-10-26 16:24:55 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2011-11-18 11:20:15 -0500 |
commit | 9beb3bf5a92bb8fc6503f844bf0772df29f14a02 (patch) | |
tree | c60963c27d0a93ae1f572e6fda9c090a4a702d4e /fs/dlm/dlm_internal.h | |
parent | c3b92c8787367a8bb53d57d9789b558f1295cc96 (diff) |
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.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index fe2860c02449..5685a9a5dba2 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h | |||
@@ -103,8 +103,8 @@ struct dlm_dirtable { | |||
103 | }; | 103 | }; |
104 | 104 | ||
105 | struct dlm_rsbtable { | 105 | struct dlm_rsbtable { |
106 | struct list_head list; | 106 | struct rb_root keep; |
107 | struct list_head toss; | 107 | struct rb_root toss; |
108 | spinlock_t lock; | 108 | spinlock_t lock; |
109 | }; | 109 | }; |
110 | 110 | ||
@@ -285,7 +285,10 @@ struct dlm_rsb { | |||
285 | unsigned long res_toss_time; | 285 | unsigned long res_toss_time; |
286 | uint32_t res_first_lkid; | 286 | uint32_t res_first_lkid; |
287 | struct list_head res_lookup; /* lkbs waiting on first */ | 287 | struct list_head res_lookup; /* lkbs waiting on first */ |
288 | struct list_head res_hashchain; /* rsbtbl */ | 288 | union { |
289 | struct list_head res_hashchain; | ||
290 | struct rb_node res_hashnode; /* rsbtbl */ | ||
291 | }; | ||
289 | struct list_head res_grantqueue; | 292 | struct list_head res_grantqueue; |
290 | struct list_head res_convertqueue; | 293 | struct list_head res_convertqueue; |
291 | struct list_head res_waitqueue; | 294 | struct list_head res_waitqueue; |