List:Commits« Previous MessageNext Message »
From:mikael Date:May 22 2007 11:37am
Subject:bk commit into 5.1 tree (mikron:1.2454)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mikron. When mikron does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-05-22 11:37:35+02:00, mikron@stripped +3 -0
  Add possibility to use/not use epoll
  Default is to not use it

  config/ac-macros/ha_ndbcluster.m4@stripped, 2007-05-22 11:36:34+02:00,
mikron@stripped +23 -0
    Add possibility to use/not use epoll
    Default is to not use it

  storage/ndb/include/transporter/TransporterRegistry.hpp@stripped, 2007-05-22 11:36:34+02:00,
mikron@stripped +3 -3
    Add possibility to use/not use epoll
    Default is to not use it

  storage/ndb/src/common/transporter/TransporterRegistry.cpp@stripped, 2007-05-22
11:36:34+02:00, mikron@stripped +9 -9
    Add possibility to use/not use epoll
    Default is to not use it

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	mikron
# Host:	mikael-ronstr-ms-dator.local
# Root:	/Users/mikron/mysql_clones/bench_11

--- 1.29/config/ac-macros/ha_ndbcluster.m4	2007-03-06 22:47:35 +01:00
+++ 1.30/config/ac-macros/ha_ndbcluster.m4	2007-05-22 11:36:34 +02:00
@@ -52,6 +52,12 @@
       ;;
   esac
 
+  AC_ARG_WITH([ndb-epoll],
+              [
+  --with-ndb-epoll       Use epoll/poll for NDB Transporter],
+              [ndb_epoll="$withval"],
+              [ndb_epoll=no])
+
   AC_ARG_WITH([ndb-test],
               [
   --with-ndb-test       Include the NDB Cluster ndbapi test programs],
@@ -140,6 +146,15 @@
       ;;
   esac
 
+  case "$ndb_epoll" in
+    yes )
+      have_ndb_epoll="yes"
+      ;;
+    * )
+      have_ndb_epoll="no"
+      ;;
+  esac
+
   AC_MSG_RESULT([done.])
 ])
 
@@ -227,6 +242,14 @@
     have_ndb_binlog="yes"
   fi
 
+  if test X"$have_ndb_epoll" = Xyes
+  then
+    AC_DEFINE([NDB_EPOLL], [1],
+              [Including epoll in NDB transporter])
+    AC_MSG_RESULT([-- using epoll in NDB Transporter])
+  else
+    AC_MSG_RESULT([-- Not using epoll in NDB Transporter])
+  fi
   if test X"$have_ndb_binlog" = Xyes
   then
     AC_DEFINE([WITH_NDB_BINLOG], [1],

--- 1.36/storage/ndb/include/transporter/TransporterRegistry.hpp	2007-04-02 16:47:28
+02:00
+++ 1.37/storage/ndb/include/transporter/TransporterRegistry.hpp	2007-05-22 11:36:34
+02:00
@@ -26,7 +26,7 @@
 //***************************************************************************/
 #ifndef TransporterRegistry_H
 #define TransporterRegistry_H
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL)
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL) &&
defined(NDB_EPOLL)
 #include <sys/poll.h>
 #include <sys/epoll.h>
 #endif
@@ -39,7 +39,7 @@
 
 #include <mgmapi/mgmapi.h>
 
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL)
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL) &&
defined(NDB_EPOLL)
 struct trp_sort
 {
   Uint32 trp_id;
@@ -298,7 +298,7 @@
   int nSCITransporters;
   int nSHMTransporters;
 
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL)
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL) &&
defined(NDB_EPOLL)
 #define EPOLL_NOWHERE 0
 #define EPOLL_IN_EPOLL 1
 #define EPOLL_IN_POLL 4

--- 1.84/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2007-04-02 16:47:28
+02:00
+++ 1.85/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2007-05-22 11:36:34
+02:00
@@ -93,7 +93,7 @@
   performStates       = new PerformState      [maxTransporters];
   ioStates            = new IOState           [maxTransporters];
 
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL)
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL) &&
defined(NDB_EPOLL)
   m_num_poll_events = 1;
   m_curr_poll_events = 0;
   m_epoll_fd = 0;
@@ -183,7 +183,7 @@
   delete[] performStates;
   delete[] ioStates;
 
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL)
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL) &&
defined(NDB_EPOLL)
   delete [] m_epoll_events;
   delete [] m_poll_events;
   delete [] the_poll_tcp_transporters;
@@ -707,7 +707,7 @@
 void
 TransporterRegistry::set_poll_sockets_in_epoll(Uint32 poll_sockets)
 {
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL)
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL) &&
defined(NDB_EPOLL)
   m_num_poll_events = poll_sockets;
 #endif
 }
@@ -734,7 +734,7 @@
 #endif
 
 #ifdef NDB_TCP_TRANSPORTER
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL)
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL) &&
defined(NDB_EPOLL)
   Uint32 num_trps = nTCPTransporters;
   Uint32 num_poll_events = m_curr_poll_events;
   /*
@@ -883,7 +883,7 @@
 }
 #endif
 
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL)
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL) &&
defined(NDB_EPOLL)
 void
 TransporterRegistry::set_num_poll_events(Uint32 num_poll_events)
 {
@@ -1118,7 +1118,7 @@
 TransporterRegistry::performReceive()
 {
 #ifdef NDB_TCP_TRANSPORTER
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL)
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL) &&
defined(NDB_EPOLL)
   int num_socket_events = tcpReadSelectReply;
   Uint32 num_poll_events = m_curr_poll_events;
   Uint32 i;
@@ -1393,7 +1393,7 @@
   DBUG_ENTER("TransporterRegistry::report_connect");
   DBUG_PRINT("info",("performStates[%d]=CONNECTED",node_id));
   performStates[node_id] = CONNECTED;
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL)
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL) &&
defined(NDB_EPOLL)
   assert(m_epoll_state[node_id] == EPOLL_NOWHERE);
   if (theTransporterTypes[node_id] == tt_TCP_TRANSPORTER)
   {
@@ -1411,7 +1411,7 @@
 void
 TransporterRegistry::remove_from_epoll(NodeId node_id)
 {
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL)
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL) &&
defined(NDB_EPOLL)
   DBUG_ENTER("TransporterRegistry::remove_from_epoll");
   if (m_epoll_state[node_id] == EPOLL_IN_POLL)
     remove_poll_list((TCP_Transporter*)theTransporters[node_id],
@@ -1468,7 +1468,7 @@
       break;
     }
   }
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL)
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_POLL) &&
defined(NDB_EPOLL)
   if (++m_update_connections == 5 || node_change)
   {
     m_update_connections = 0;
Thread
bk commit into 5.1 tree (mikron:1.2454)mikael22 May