diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-08 13:35:56 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-08 13:35:56 -0400 |
commit | 37b2fa6a24f996d751dc80fbc8a77602cead269b (patch) | |
tree | 2b96dc483c92593fac467076e76433f6fd6297be /fs/gfs2/incore.h | |
parent | 9b47c11d1cbedcba685c9bd90c73fd41acdfab0e (diff) |
[GFS2] Move rwlocks in glock.c into their own array
This splits the rwlocks guarding the hash chains of the glock hash
table into their own array. This will reduce memory usage in some
cases due to better alignment, although the real reason for doing it
is to allow the two tables to be different sizes in future (i.e.
the locks will be sized proportionally with the max number of CPUs
and the hash chains sized proportinally with the size of physical memory)
In order to allow this, the gl_bucket member of struct gfs2_glock has
now become gl_hash, so we record the hash rather than a pointer to the
bucket itself.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r-- | fs/gfs2/incore.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 9f5d98ff823a..f50ea6282e77 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h | |||
@@ -106,11 +106,6 @@ struct gfs2_bufdata { | |||
106 | struct list_head bd_ail_gl_list; | 106 | struct list_head bd_ail_gl_list; |
107 | }; | 107 | }; |
108 | 108 | ||
109 | struct gfs2_gl_hash_bucket { | ||
110 | rwlock_t hb_lock; | ||
111 | struct list_head hb_list; | ||
112 | }; | ||
113 | |||
114 | struct gfs2_glock_operations { | 109 | struct gfs2_glock_operations { |
115 | void (*go_xmote_th) (struct gfs2_glock * gl, unsigned int state, | 110 | void (*go_xmote_th) (struct gfs2_glock * gl, unsigned int state, |
116 | int flags); | 111 | int flags); |
@@ -175,6 +170,7 @@ struct gfs2_glock { | |||
175 | spinlock_t gl_spin; | 170 | spinlock_t gl_spin; |
176 | 171 | ||
177 | unsigned int gl_state; | 172 | unsigned int gl_state; |
173 | unsigned int gl_hash; | ||
178 | struct task_struct *gl_owner; | 174 | struct task_struct *gl_owner; |
179 | unsigned long gl_ip; | 175 | unsigned long gl_ip; |
180 | struct list_head gl_holders; | 176 | struct list_head gl_holders; |
@@ -195,7 +191,6 @@ struct gfs2_glock { | |||
195 | unsigned long gl_stamp; | 191 | unsigned long gl_stamp; |
196 | void *gl_object; | 192 | void *gl_object; |
197 | 193 | ||
198 | struct gfs2_gl_hash_bucket *gl_bucket; | ||
199 | struct list_head gl_reclaim; | 194 | struct list_head gl_reclaim; |
200 | 195 | ||
201 | struct gfs2_sbd *gl_sbd; | 196 | struct gfs2_sbd *gl_sbd; |