GFS2: Use RCU for glock hash table
authorSteven Whitehouse <swhiteho@redhat.com>
Wed, 19 Jan 2011 09:30:01 +0000 (09:30 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 21 Jan 2011 09:39:08 +0000 (09:39 +0000)
commitbc015cb84129eb1451913cfebece270bf7a39e0f
tree4f116a61b802d87ae80051e9ae05d8fcb73d9ae7
parent2b1caf6ed7b888c95a1909d343799672731651a5
GFS2: Use RCU for glock hash table

This has a number of advantages:

 - Reduces contention on the hash table lock
 - Makes the code smaller and simpler
 - Should speed up glock dumps when under load
 - Removes ref count changing in examine_bucket
 - No longer need hash chain lock in glock_put() in common case

There are some further changes which this enables and which
we may do in the future. One is to look at using SLAB_RCU,
and another is to look at using a per-cpu counter for the
per-sb glock counter, since that is touched twice in the
lifetime of each glock (but only used at umount time).

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
fs/gfs2/glock.c
fs/gfs2/glock.h
fs/gfs2/glops.c
fs/gfs2/incore.h
fs/gfs2/lock_dlm.c
fs/gfs2/lops.c
fs/gfs2/main.c
fs/gfs2/ops_fstype.c