FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 04-10-2012, 12:56 PM
Bob Peterson
 
Default GFS2: Allow caching of rindex glock

Hi,

This patch allows caching of the rindex glock. We were previously
setting the GL_NOCACHE bit when the glock was released. That forced
the rindex inode to be invalidated, which caused us to re-read
rindex at the next access. However, it caused the glock to be
unnecessarily bounced around the cluster. This patch allows
the glock to remain cached, but it still causes the rindex to be
re-read once it has been written to by gfs2_grow.

Ben and I have tested single-node gfs2_grow cases and I've tested
clustered gfs2_grow cases on my four-node cluster.

Regards,

Bob Peterson
Red Hat File Systems

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
Author: Bob Peterson <rpeterso@redhat.com>
Date: Thu Apr 5 13:59:00 2012 -0500

GFS2: Allow caching of rindex glock

This patch allows the caching of the rindex file. This keeps the
lock from being bounced around.

diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index 38b7a74..9b2ff0e 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -807,7 +807,7 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,

if (inode == sdp->sd_rindex) {
adjust_fs_space(inode);
- ip->i_gh.gh_flags |= GL_NOCACHE;
+ sdp->sd_rindex_uptodate = 0;
}

brelse(dibh);
@@ -873,7 +873,7 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping,

if (inode == sdp->sd_rindex) {
adjust_fs_space(inode);
- ip->i_gh.gh_flags |= GL_NOCACHE;
+ sdp->sd_rindex_uptodate = 0;
}

brelse(dibh);
 
Old 04-10-2012, 01:15 PM
Steven Whitehouse
 
Default GFS2: Allow caching of rindex glock

Hi,

Now in both the -fixes and -nmw git trees. Thanks,

Steve.

On Tue, 2012-04-10 at 08:56 -0400, Bob Peterson wrote:
> Hi,
>
> This patch allows caching of the rindex glock. We were previously
> setting the GL_NOCACHE bit when the glock was released. That forced
> the rindex inode to be invalidated, which caused us to re-read
> rindex at the next access. However, it caused the glock to be
> unnecessarily bounced around the cluster. This patch allows
> the glock to remain cached, but it still causes the rindex to be
> re-read once it has been written to by gfs2_grow.
>
> Ben and I have tested single-node gfs2_grow cases and I've tested
> clustered gfs2_grow cases on my four-node cluster.
>
> Regards,
>
> Bob Peterson
> Red Hat File Systems
>
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> ---
> Author: Bob Peterson <rpeterso@redhat.com>
> Date: Thu Apr 5 13:59:00 2012 -0500
>
> GFS2: Allow caching of rindex glock
>
> This patch allows the caching of the rindex file. This keeps the
> lock from being bounced around.
>
> diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
> index 38b7a74..9b2ff0e 100644
> --- a/fs/gfs2/aops.c
> +++ b/fs/gfs2/aops.c
> @@ -807,7 +807,7 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,
>
> if (inode == sdp->sd_rindex) {
> adjust_fs_space(inode);
> - ip->i_gh.gh_flags |= GL_NOCACHE;
> + sdp->sd_rindex_uptodate = 0;
> }
>
> brelse(dibh);
> @@ -873,7 +873,7 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping,
>
> if (inode == sdp->sd_rindex) {
> adjust_fs_space(inode);
> - ip->i_gh.gh_flags |= GL_NOCACHE;
> + sdp->sd_rindex_uptodate = 0;
> }
>
> brelse(dibh);
>
 
Old 04-11-2012, 08:56 AM
Steven Whitehouse
 
Default GFS2: Allow caching of rindex glock

From: Bob Peterson <rpeterso@redhat.com>

This patch allows caching of the rindex glock. We were previously
setting the GL_NOCACHE bit when the glock was released. That forced
the rindex inode to be invalidated, which caused us to re-read
rindex at the next access. However, it caused the glock to be
unnecessarily bounced around the cluster. This patch allows
the glock to remain cached, but it still causes the rindex to be
re-read once it has been written to by gfs2_grow.

Ben and I have tested single-node gfs2_grow cases and I've tested
clustered gfs2_grow cases on my four-node cluster.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index 38b7a74..9b2ff0e 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -807,7 +807,7 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,

if (inode == sdp->sd_rindex) {
adjust_fs_space(inode);
- ip->i_gh.gh_flags |= GL_NOCACHE;
+ sdp->sd_rindex_uptodate = 0;
}

brelse(dibh);
@@ -873,7 +873,7 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping,

if (inode == sdp->sd_rindex) {
adjust_fs_space(inode);
- ip->i_gh.gh_flags |= GL_NOCACHE;
+ sdp->sd_rindex_uptodate = 0;
}

brelse(dibh);
--
1.7.4
 

Thread Tools




All times are GMT. The time now is 12:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org