From: wcheng@sourceware.org <wcheng@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs-kernel/src/gfs glock.c
Date: 26 Jun 2007 17:50:06 -0000 [thread overview]
Message-ID: <20070626175006.16845.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: wcheng at sourceware.org 2007-06-26 17:50:06
Modified files:
gfs-kernel/src/gfs: glock.c
Log message:
RedHat bugzilla 239727:
Previous CVS check-in did a last minute change with the way purge count
was calculated. The intention was to trim glocks evenly across all the
hash buckets and apparently the size of hash array was overlooked. It
ends up with zero trimming count most of the time. This virtually makes
glock trimming patch a void feature.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/glock.c.diff?cvsroot=cluster&r1=1.32&r2=1.33
--- cluster/gfs-kernel/src/gfs/glock.c 2007/06/17 05:34:53 1.32
+++ cluster/gfs-kernel/src/gfs/glock.c 2007/06/26 17:50:06 1.33
@@ -2496,13 +2496,12 @@
static int
examine_bucket(glock_examiner examiner,
struct gfs_sbd *sdp, struct gfs_gl_hash_bucket *bucket,
- unsigned int purge_nr)
+ unsigned int *purge_nr)
{
struct glock_plug plug;
struct list_head *tmp;
struct gfs_glock *gl;
int entries;
- unsigned int p_cnt=purge_nr;
/* Add "plug" to end of bucket list, work back up list from there */
memset(&plug.gl_flags, 0, sizeof(unsigned long));
@@ -2543,7 +2542,7 @@
write_unlock(&bucket->hb_lock);
- examiner(gl, &p_cnt);
+ examiner(gl, &purge_nr);
}
}
@@ -2655,11 +2654,11 @@
purge_nr = 0;
else
purge_nr = (atomic_read(&sdp->sd_glock_count) -
- atomic_read(&sdp->sd_glock_held_count)) *
- sdp->sd_tune.gt_glock_purge / 100 / GFS_GL_HASH_SIZE;
+ atomic_read(&sdp->sd_glock_count)) *
+ sdp->sd_tune.gt_glock_purge / 100;
for (x = 0; x < GFS_GL_HASH_SIZE; x++) {
- examine_bucket(scan_glock, sdp, &sdp->sd_gl_hash[x], purge_nr);
+ examine_bucket(scan_glock, sdp, &sdp->sd_gl_hash[x], &purge_nr);
cond_resched();
}
}
next reply other threads:[~2007-06-26 17:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-26 17:50 wcheng [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-01-29 22:21 [Cluster-devel] cluster/gfs-kernel/src/gfs glock.c bmarzins
2008-01-28 6:40 fabbione
2008-01-24 22:23 bmarzins
2008-01-24 20:42 bmarzins
2008-01-24 20:25 bmarzins
2008-01-24 20:08 bmarzins
2007-06-26 20:39 wcheng
2007-06-26 20:34 wcheng
2007-06-26 19:43 wcheng
2007-06-26 19:42 wcheng
2007-06-26 18:38 wcheng
2007-06-26 18:30 wcheng
2007-06-26 17:38 wcheng
2007-01-25 22:38 wcheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070626175006.16845.qmail@sourceware.org \
--to=wcheng@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).