Bläddra i källkod

Merge branch 'master', remote branch 'origin/master'

Steven Dake 15 år sedan
förälder
incheckning
0730d997b1
12 ändrade filer med 227 tillägg och 33 borttagningar
  1. 19 0
      .gitignore
  2. 145 25
      TODO
  3. 2 0
      cts/.gitignore
  4. 1 0
      exec/.gitignore
  5. 3 0
      include/corosync/.gitignore
  6. 1 0
      init/.gitignore
  7. 3 0
      lcr/.gitignore
  8. 1 0
      man/.gitignore
  9. 1 0
      pkgconfig/.gitignore
  10. 20 0
      test/.gitignore
  11. 24 8
      test/cpgverify.c
  12. 7 0
      tools/.gitignore

+ 19 - 0
.gitignore

@@ -0,0 +1,19 @@
+*.o
+*.a
+*.lcrso
+*.so*
+.deps
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache/
+config.guess
+config.log
+config.status
+config.sub
+configure
+depcomp
+install-sh
+missing
+tags
+ID

+ 145 - 25
TODO

@@ -1,25 +1,145 @@
-The Corosync Cluster Engine Work Items Requiring Attention
-Last Updated: Mar 19, 2009
-
-Generic Items
--------------
-* doxygen-ize the include and lib directories.
-
-Totem
------
-* Disallow binding to localhost interface in redundant ring configuration.
-* Implement the totem multiring protocol.
-
-Closed Process Groups
----------------------
-* async cpg multicast.
-
-IPC
----
-* none.
-
-SYNC
-----
-* Forward compatible sync engine.
-* Advanced Synchronization Engine needed to synchronize data without
-  long blocking delays during configuration changes.
+------------------------------------------
+The Corosync Cluster Engine Topic Branches
+------------------------------------------
+
+--------------------------
+Last Updated: October 2010
+--------------------------
+
+We use topic branches in our git repository to develop new disruptive features
+that define our future roadmap.  This file describes the topic branches
+the developers have interest in investigating further.
+
+targets can be: whitetank, needle, or future (3.0+).
+Finished can be: percentage or date merged to master.
+
+------------------------------------------------------------------------------
+topic-libqb
+------------------------------------------------------------------------------
+Main Developer: Angus Salkeld
+Started: September 2010
+Finished: 60%
+target: needle
+Description:
+The libqb project is our effort to remove the core infrastructure required for
+client server operations of corosync from the corosync code base and place
+inside a separate project.
+
+The main purpose of this topic is to investigate integrating corosync with the 
+libqb package that has been refactored.  Part of this effort also involves
+investigation into single threaded operation of the IPC layer without
+peformance penalties.
+
+------------------------------------------------------------------------------
+topic-rr
+------------------------------------------------------------------------------
+Main Developer: Steven Dake
+Started: Not Started
+Finished: 0%
+target: needle
+Description:
+Redundant ring may have quality problems near boundary conditions for sequence
+numbers.  This effort involves qualifying and hardening redundant ring around
+these boundary numbers.  A further stretch goal of this topic is to
+automatically reenable a redundant ring when it has been back in service.
+
+------------------------------------------------------------------------------
+topic-snmp
+------------------------------------------------------------------------------
+Main Developer: Steven Dake
+Started: Not Started
+Finished: 0%
+target: needle
+Description:
+This topic involves investigation of adding SNMP support into Corosync.
+
+------------------------------------------------------------------------------
+topic-udpu
+------------------------------------------------------------------------------
+Main Developer: Steven Dake
+Started: October
+Finished: 80%
+target: needle
+Description:
+The UDPU transport mode offers a mechanism for Corosync to operate in network
+environments where multicast or broadcast are prohibited.  The main mechanism
+it uses to do this is to UDP unicast to each of the target node IP addresses
+listed in the configuation.
+
+------------------------------------------------------------------------------
+topic-onecrypt
+------------------------------------------------------------------------------
+Main Developer: Honza Friesse
+Started: not started
+Finished: 0%
+target: needle
+Description:
+Currently encryption code is located in totemudp.c, totemudpu.c, and iba has
+no encryption support.  This topic merges the encryption code into a new
+file such as totemcrp.c and provides a mechanism for totemnet.c to register
+encrypt and decrypt functions with totem[udp|iba|udpu] and use them as
+requested by the configuration.
+
+------------------------------------------------------------------------------
+topic-netmalloc
+------------------------------------------------------------------------------
+Main Developer: Steven Dake
+Started: not started
+Finished: 0%
+target: needle
+Description:
+The totemiba.c driver must allocate memory and assign it to a protection domain
+in order for an infiniband driver to transmit memory.  In the current
+implementation, totemsrp.c also allocates these same frames.  This results in
+an extra memcpy when transmitting with libibverbs technology.  Memory copies
+are to be avoided.  The simple solution is to have each network driver provide
+a memory allocation function.  When totemsrp wants a free frame, it requests
+it from the network driver.
+
+------------------------------------------------------------------------------
+topic-iazc
+------------------------------------------------------------------------------
+Main Developer: Steven Dake
+Started: not started
+Finished: 0%
+target: needle
+Description:
+The totempg.c file uses alloca/memcpy to deal with misaligned data structures
+to avoid bus errors on hardware which does not support unaligned access.  This
+topic addresses the totempg.c code to avoid memory copies on platforms which
+support unaligned access (x86/x86_64) and use the current alloca/memcpy
+on platforms which don't (pretty much all other processor types).
+
+------------------------------------------------------------------------------
+topic-rdmaud
+------------------------------------------------------------------------------
+Main Developer: Steven Dake
+Started: not started
+Finished: 0%
+target: needle or future
+Description:
+Currently our RDMA code uses librdmacm to setup connections.  We are not 
+certain this extra library is needed, and may be able to use only ibverbs.  If
+this is possible, the totem code may be more reliable, especially around
+failure conditions.
+
+------------------------------------------------------------------------------
+topic-zerocopy
+------------------------------------------------------------------------------
+Main Developer: Steven Dake
+Started: not started
+Finished: 0%
+target: future
+Description:
+Totem has many copies involved in messaging which we would like to investigate
+removing.  Our goal is to deliver wire speed performance for rdma networks,
+and if this can be achieved by our other topic investigations, we may not
+further investigate this topic.  The basic idea of the topic is to handle
+message assembly/fragmentation in libcpg, and have totem be responsible for
+sending these pages that are shared via posix shared memory.
+
+------------------------------------------------------------------------------
+other topics not yet defined:
+* disallow binding to localhost interfae in redundant ring configuation.
+* doxygenize include and lib directories.
+* sort out binding to localhost in general

+ 2 - 0
cts/.gitignore

@@ -0,0 +1,2 @@
+CTSvars.py
+*_test_agent

+ 1 - 0
exec/.gitignore

@@ -0,0 +1 @@
+corosync

+ 3 - 0
include/corosync/.gitignore

@@ -0,0 +1,3 @@
+config.h*
+cs_config.h
+stamp-*

+ 1 - 0
init/.gitignore

@@ -0,0 +1 @@
+generic

+ 3 - 0
lcr/.gitignore

@@ -0,0 +1,3 @@
+test
+test_static
+uic

+ 1 - 0
man/.gitignore

@@ -0,0 +1 @@
+*.html

+ 1 - 0
pkgconfig/.gitignore

@@ -0,0 +1 @@
+*.pc

+ 20 - 0
test/.gitignore

@@ -0,0 +1,20 @@
+cpgbench
+cpgbound
+cpgverify
+evsbench
+evsverify
+logsys_s
+logsys_t1
+logsys_t2
+logsysbench
+logsysrec
+stress_cpgcontext
+stress_cpgfdget
+testconfdb
+testcpg
+testcpg2
+testevs
+testquorum
+testsam
+testvotequorum1
+testvotequorum2

+ 24 - 8
test/cpgverify.c

@@ -34,6 +34,7 @@
 
 #include <config.h>
 
+#include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/socket.h>
@@ -102,15 +103,28 @@ static struct cpg_name group_name = {
 
 
 static unsigned char buffer[200000];
-int main (void)
+int main (int argc, char *argv[])
 {
 	cpg_handle_t handle;
 	cs_error_t result;
-	unsigned int i = 0, j;
+	int i = 0;
+	int j;
 	struct my_msg msg;
 	hash_state sha1_hash;
 	struct iovec iov[2];
-	int res;
+	const char *options = "i:";
+	int iter = 1000;
+	int opt;
+	int run_forever = 1;
+
+	while ((opt = getopt(argc, argv, options)) != -1) {
+		switch (opt) {
+		case 'i':
+			run_forever = 0;
+			iter = atoi(optarg);
+			break;
+		}
+	}
 
 	result = cpg_initialize (&handle, &callbacks);
 	if (result != CS_OK) {
@@ -118,9 +132,9 @@ int main (void)
 		exit (0);
 	}
 
-        res = cpg_join (handle, &group_name);
-        if (res != CS_OK) {
-                printf ("cpg_join failed with result %d\n", res);
+        result = cpg_join (handle, &group_name);
+        if (result != CS_OK) {
+                printf ("cpg_join failed with result %d\n", result);
                 exit (1);
         }
 
@@ -131,7 +145,8 @@ int main (void)
 	/*
 	 * Demonstrate cpg_mcast_joined
 	 */
-	for (i = 0; i < 1000000000; i++) {
+	i = 0;
+	do {
 		msg.msg_size = 100 + rand() % 100000;
 		iov[1].iov_len = msg.msg_size;
 		for (j = 0; j < msg.msg_size; j++) {
@@ -149,7 +164,8 @@ try_again_one:
 			goto try_again_one;
 		}
 		result = cpg_dispatch (handle, CS_DISPATCH_ALL);
-	}
+		i++;
+	} while (run_forever || i < iter);
 
 	cpg_finalize (handle);
 

+ 7 - 0
tools/.gitignore

@@ -0,0 +1,7 @@
+corosync-cfgtool
+corosync-cpgtool
+corosync-fplay
+corosync-keygen
+corosync-objctl
+corosync-pload
+corosync-quorumtool