From: jbrassow@sourceware.org <jbrassow@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/cmirror/src link_mon.c local.c queues.c
Date: 25 Jan 2008 16:24:48 -0000 [thread overview]
Message-ID: <20080125162448.23980.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: jbrassow at sourceware.org 2008-01-25 16:24:47
Modified files:
cmirror/src : link_mon.c local.c queues.c
Log message:
- reduce the number of cluster requests.
- debugging code that counts requests will be removed later
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/link_mon.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.3&r2=1.1.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/local.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.9&r2=1.1.2.10
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/queues.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.4&r2=1.1.2.5
--- cluster/cmirror/src/Attic/link_mon.c 2008/01/14 22:52:17 1.1.2.3
+++ cluster/cmirror/src/Attic/link_mon.c 2008/01/25 16:24:47 1.1.2.4
@@ -110,10 +110,8 @@
}
r = poll(pfds, used_pfds, -1);
- if (r <= 0) {
- LOG_ERROR("Error from poll: %d", r);
+ if (r <= 0)
return r;
- }
r = 0;
/* FIXME: handle POLLHUP */
--- cluster/cmirror/src/Attic/local.c 2008/01/23 21:21:06 1.1.2.9
+++ cluster/cmirror/src/Attic/local.c 2008/01/25 16:24:47 1.1.2.10
@@ -17,6 +17,7 @@
static int cn_fd; /* Connector (netlink) socket fd */
static int request_array[20]; /* for request counting (debugging) */
+static int cluster_array[20]; /* for request counting (debugging) */
static int kernel_recv_helper(void *data, int in_size)
{
@@ -155,9 +156,6 @@
request_array[tfr->request_type]++;
request_count++;
- if (!(request_count % 10000))
- for (i = 0; i < 20; i++)
- LOG_PRINT(" %s: %d", RQ_TYPE(i), request_array[i]);
LOG_DBG("Request from kernel recieved [%s/%s/%llu]",
RQ_TYPE(tfr->request_type), SHORT_UUID(tfr->uuid),
@@ -165,6 +163,7 @@
switch (tfr->request_type) {
case DM_CLOG_CTR:
case DM_CLOG_DTR:
+ case DM_CLOG_IN_SYNC:
case DM_CLOG_STATUS_INFO:
case DM_CLOG_STATUS_TABLE:
case DM_CLOG_PRESUSPEND:
@@ -209,6 +208,7 @@
}
/* ELSE, fall through to default */
default:
+ cluster_array[tfr->request_type]++;
/* Add before send_to_cluster, so cluster code can find it */
queue_add_tail(tfr, cluster_queue);
r = cluster_send(tfr);
@@ -223,6 +223,14 @@
tfr->error = r;
}
+ if (!(request_count % 10000)) {
+ LOG_PRINT("Total requests (%d):", request_count);
+ for (i = 0; i < 20; i++)
+ LOG_PRINT(" %s: %d", RQ_TYPE(i), request_array[i]);
+ LOG_PRINT("Cluster-bound requests:");
+ for (i = 0; i < 20; i++)
+ LOG_PRINT(" %s: %d", RQ_TYPE(i), cluster_array[i]);
+ }
EXIT();
return r;
}
@@ -296,6 +304,7 @@
ENTER();
memset(request_array, 0, sizeof(int)*20);
+ memset(cluster_array, 0, sizeof(int)*20);
cn_fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR);
if (cn_fd < 0) {
--- cluster/cmirror/src/Attic/queues.c 2008/01/23 21:21:06 1.1.2.4
+++ cluster/cmirror/src/Attic/queues.c 2008/01/25 16:24:47 1.1.2.5
@@ -25,7 +25,7 @@
if (!q)
return;
- if (q->count)
+ if (q->count && (q != free_queue))
LOG_ERROR("WARNING: There are still items in %s\n",
WHICH_QUEUE(q));
reply other threads:[~2008-01-25 16:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080125162448.23980.qmail@sourceware.org \
--to=jbrassow@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).