apparently causing problems under some workloads

regards
-steve
Index: exec/totempg.c
===================================================================
--- exec/totempg.c	(revision 2535)
+++ exec/totempg.c	(working copy)
@@ -763,8 +763,7 @@
 {
 	int res = 0;
 	struct totempg_mcast mcast;
-	unsigned int extra_iovec;
-	struct iovec iovecs[4];
+	struct iovec iovecs[3];
 	struct iovec iovec[64];
 	int i;
 	int dest, src;
@@ -772,7 +771,6 @@
 	int copy_len = 0;
 	int copy_base = 0;
 	int total_size = 0;
-	int iov2_size = 0;
 
 	pthread_mutex_lock (&mcast_msg_mutex);
 	totemmrp_new_msg_signal ();
@@ -840,19 +838,16 @@
 			unsigned char *data_ptr;
 
 			copy_len = min(copy_len, max_packet_size - fragment_size);
-			if (copy_len == max_packet_size) {
+			if( copy_len == max_packet_size )
 				data_ptr = (unsigned char *)iovec[i].iov_base + copy_base;
-				extra_iovec = 0;
-				iov2_size = max_packet_size;
-			} else {
-				extra_iovec = 1;
+			else {
 				data_ptr = fragmentation_data;
-				
-				iovecs[3].iov_base = (((char *)iovec[i].iov_base) + copy_base);
-				iovecs[3].iov_len = copy_len;
-				iov2_size = max_packet_size - copy_len;
+				memcpy (&fragmentation_data[fragment_size],
+				(unsigned char *)iovec[i].iov_base + copy_base, copy_len);
 			}
 
+			memcpy (&fragmentation_data[fragment_size],
+				(unsigned char *)iovec[i].iov_base + copy_base, copy_len);
 			mcast_packed_msg_lens[mcast_packed_msg_count] += copy_len;
 
 			/*
@@ -883,9 +878,9 @@
 			iovecs[1].iov_len = mcast_packed_msg_count *
 				sizeof(unsigned short);
 			iovecs[2].iov_base = (void *)data_ptr;
-			iovecs[2].iov_len = iov2_size;
+			iovecs[2].iov_len = max_packet_size;
 			assert (totemmrp_avail() > 0);
-			res = totemmrp_mcast (iovecs, 3 + extra_iovec, guarantee);
+			res = totemmrp_mcast (iovecs, 3, guarantee);
 			if (res == -1) {
 				goto error_exit;
 			}
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to