[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-87-g23e72c4

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".


The branch, RHEL5 has been updated
       via  23e72c453fcb6b67044d14a778a0b82de95b399c (commit)
      from  2efffab5f6d58ac8a8ae90f07f8a68f5452e763e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 23e72c453fcb6b67044d14a778a0b82de95b399c
Author: Jonathan Brassow <jbrassow redhat com>
Date:   Fri May 16 12:58:00 2008 -0500

    dm-log-clustered:  Optimization - no need to send get_resync_work if none left
    Once recovery has finished, it is never restarted until the mirror is
    suspended/resumed.  So, we can immediately return 0 on a 'get_resync_work'
    call if recovery has finished (rather than sending to userspace, and then
    around the cluster).  This improves performance.


Summary of changes:
 cmirror-kernel/src/dm-clog.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/cmirror-kernel/src/dm-clog.c b/cmirror-kernel/src/dm-clog.c
index b61de62..62ad414 100644
--- a/cmirror-kernel/src/dm-clog.c
+++ b/cmirror-kernel/src/dm-clog.c
@@ -23,6 +23,13 @@ struct log_c {
 	char *ctr_str; /* Gives ability to restart if userspace dies */
 	uint32_t ctr_size;
+	/*
+	 * in_sync_hint gets set when doing is_remote_recovering.  It
+	 * represents the first region that needs recovery.  IOW, the
+	 * first zero bit of sync_bits.  This can be useful for to limit
+	 * traffic for calls like is_remote_recovering and get_resync_work,
+	 * but be take care in its use for anything else.
+	 */
 	uint64_t in_sync_hint;
 	spinlock_t flush_lock;
@@ -528,6 +535,9 @@ static int cluster_get_resync_work(struct dirty_log *log, region_t *region)
 	struct log_c *lc = (struct log_c *)log->context;
 	struct { int i; region_t r; } pkg;
+	if (lc->in_sync_hint >= lc->region_count)
+		return 0;
 	rdata_size = sizeof(pkg);
 	r = cluster_do_request(lc, lc->uuid, DM_CLOG_GET_RESYNC_WORK,
 			       NULL, 0,

Cluster Project

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]