[GFS2] Speed up scanning of glocks
authorSteven Whitehouse <swhiteho@redhat.com>
Thu, 24 Aug 2006 21:03:05 +0000 (17:03 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Thu, 24 Aug 2006 21:03:05 +0000 (17:03 -0400)
commita2242db0906445491d9ac50bfa756b0de0a25d45
treeed530c05eaae5293fd6b14cfb05bdee655adc586
parent166afccd71fbb7bd758ab9fc770eef4924081077
[GFS2] Speed up scanning of glocks

I noticed the gfs2_scand seemed to be taking a lot of CPU,
so in order to cut that down a bit, here is a patch. Firstly
the type of a glock is a constant during its lifetime, so that
its possible to check this without needing locking. I've moved
the (common) case of testing for an inode glock outside of
the glmutex lock.

Also there was a mutex left over from when the glock cache was
master of the inode cache. That isn't required any more so I've
removed that too.

There is probably scope for further speed ups in the future
in this area.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/glock.c
fs/gfs2/incore.h
fs/gfs2/ops_fstype.c