Skip to contentSkip to conversation

Remove unneeded i_spin

PATCH New Bob Peterson 2 participants 2 messages Jan 11, 2008 GFS2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove unneeded i_spin

Hi,

This patch removes a vestigial variable "i_spin" from the gfs2_inode structure. This not only saves us memory (>300000 of these in memory for the oom test) it also saves us time because we don't have to spend time initializing it (i.e. slightly better performance).

Regards,

Bob Peterson
Red Hat GFS

--

 fs/gfs2/incore.h |    1 -
 fs/gfs2/main.c   |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)
fs/gfs2/incore.h +0 -1
index bd92a6d..1339996 100644
@@ -267,7 +267,6 @@ struct gfs2_inode {
 	struct gfs2_alloc *i_alloc;
 	u64 i_last_rg_alloc;
 
-	spinlock_t i_spin;
 	struct rw_semaphore i_rw_mutex;
 };
 
fs/gfs2/main.c +0 -1
index 88686fc..9c7765c 100644
@@ -29,7 +29,6 @@ static void gfs2_init_inode_once(struct kmem_cache *cachep, void *foo)
 	struct gfs2_inode *ip = foo;
 
 	inode_init_once(&ip->i_inode);
-	spin_lock_init(&ip->i_spin);
 	init_rwsem(&ip->i_rw_mutex);
 	ip->i_alloc = NULL;
 }
#1 lore raw

PATCH 1/1 Remove unneeded i_spin

Hi,

Now in the -nmw git tree. Thanks,

Steve.

Quoted 44 lines · Bob Peterson

Hi,

This patch removes a vestigial variable "i_spin" from the gfs2_inode structure. This not only saves us memory (>300000 of these in memory for the oom test) it also saves us time because we don't have to spend time initializing it (i.e. slightly better performance).

Regards,

Bob Peterson
Red Hat GFS

--

 fs/gfs2/incore.h |    1 -
 fs/gfs2/main.c   |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)
fs/gfs2/incore.h +0 -1
index bd92a6d..1339996 100644
@@ -267,7 +267,6 @@ struct gfs2_inode {
 	struct gfs2_alloc *i_alloc;
 	u64 i_last_rg_alloc;
 
-	spinlock_t i_spin;
 	struct rw_semaphore i_rw_mutex;
 };
 
fs/gfs2/main.c +0 -1
index 88686fc..9c7765c 100644
@@ -29,7 +29,6 @@ static void gfs2_init_inode_once(struct kmem_cache *cachep, void *foo)
 	struct gfs2_inode *ip = foo;
 
 	inode_init_once(&ip->i_inode);
-	spin_lock_init(&ip->i_spin);
 	init_rwsem(&ip->i_rw_mutex);
 	ip->i_alloc = NULL;
 }