List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:December 17 2010 3:07pm
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas:4063 to 4065)
View as plain text  
 4065 Jonas Oreland	2010-12-17
      ndb - This patch adds mlock to portlib. It also "#if 0" that mysys variants, since it gives compile error if HAVE_MLOCK is set

    modified:
      include/my_sys.h
      mysys/my_lockmem.c
      storage/ndb/include/portlib/NdbMem.h
      storage/ndb/ndb_configure.cmake
      storage/ndb/ndb_configure.m4
      storage/ndb/src/common/portlib/NdbMem.c
 4064 Jonas Oreland	2010-12-17
      ndb - improve documentation of resource-limit 0 special semantics

    modified:
      storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
 4063 jonas oreland	2010-12-16
      ndb - ndbapi refectoring: 1) make signal in TransporterFacade::sendSignal const 2) remove special handling of SignalSender wrt to TransporterFacade

    modified:
      storage/ndb/src/ndbapi/ClusterMgr.cpp
      storage/ndb/src/ndbapi/NdbApiSignal.hpp
      storage/ndb/src/ndbapi/SignalSender.cpp
      storage/ndb/src/ndbapi/SignalSender.hpp
      storage/ndb/src/ndbapi/TransporterFacade.cpp
      storage/ndb/src/ndbapi/TransporterFacade.hpp
      storage/ndb/src/ndbapi/trp_client.hpp
=== modified file 'include/my_sys.h'
--- a/include/my_sys.h	2010-10-12 14:53:28 +0000
+++ b/include/my_sys.h	2010-12-17 15:05:09 +0000
@@ -845,7 +845,7 @@ extern my_bool dynstr_set(DYNAMIC_STRING
 extern my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size);
 extern my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n);
 extern void dynstr_free(DYNAMIC_STRING *str);
-#ifdef HAVE_MLOCK
+#if defined(HAVE_MLOCK) && 0
 extern void *my_malloc_lock(size_t length,myf flags);
 extern void my_free_lock(void *ptr,myf flags);
 #else

=== modified file 'mysys/my_lockmem.c'
--- a/mysys/my_lockmem.c	2009-05-26 18:53:34 +0000
+++ b/mysys/my_lockmem.c	2010-12-17 15:05:09 +0000
@@ -22,7 +22,7 @@
 #include "mysys_err.h"
 #include <my_list.h>
 
-#ifdef HAVE_MLOCK
+#if defined(HAVE_MLOCK) && 0
 #include <sys/mman.h>
 
 struct st_mem_list

=== modified file 'storage/ndb/include/portlib/NdbMem.h'
--- a/storage/ndb/include/portlib/NdbMem.h	2010-08-18 08:19:43 +0000
+++ b/storage/ndb/include/portlib/NdbMem.h	2010-12-17 15:05:09 +0000
@@ -76,6 +76,11 @@ int NdbMem_MemLockAll(int);
  */
 int NdbMem_MemUnlockAll(void);
 
+/**
+ * Memlock region
+ */
+int NdbMem_MemLock(const void * ptr, size_t len);
+
 #ifdef	__cplusplus
 }
 #endif

=== modified file 'storage/ndb/ndb_configure.cmake'
--- a/storage/ndb/ndb_configure.cmake	2010-11-18 09:38:59 +0000
+++ b/storage/ndb/ndb_configure.cmake	2010-12-17 15:05:09 +0000
@@ -38,6 +38,7 @@ CHECK_FUNCTION_EXISTS(memalign HAVE_MEMA
 CHECK_FUNCTION_EXISTS(sysconf HAVE_SYSCONF)
 CHECK_FUNCTION_EXISTS(directio HAVE_DIRECTIO)
 CHECK_FUNCTION_EXISTS(atomic_swap_32 HAVE_ATOMIC_SWAP32)
+CHECK_FUNCTION_EXISTS(mlock HAVE_MLOCK)
 
 CHECK_INCLUDE_FILES(sun_prefetch.h HAVE_SUN_PREFETCH_H)
 

=== modified file 'storage/ndb/ndb_configure.m4'
--- a/storage/ndb/ndb_configure.m4	2010-11-09 10:45:29 +0000
+++ b/storage/ndb/ndb_configure.m4	2010-12-17 15:05:09 +0000
@@ -400,7 +400,7 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
   AC_CHECK_FUNCS(pthread_self \
     sched_get_priority_min sched_get_priority_max sched_setaffinity \
     sched_setscheduler processor_bind epoll_create \
-    posix_memalign memalign sysconf directio atomic_swap_32)
+    posix_memalign memalign sysconf directio atomic_swap_32 mlock)
 
   AC_MSG_CHECKING(for Linux scheduling and locking support)
   AC_TRY_LINK(

=== modified file 'storage/ndb/src/common/portlib/NdbMem.c'
--- a/storage/ndb/src/common/portlib/NdbMem.c	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/portlib/NdbMem.c	2010-12-17 15:05:09 +0000
@@ -83,3 +83,11 @@ int NdbMem_MemUnlockAll(){
 #endif
 }
 
+int NdbMem_MemLock(const void * ptr, size_t len)
+{
+#if defined(HAVE_MLOCK)
+  return mlock(ptr, len);
+#else
+  return -1;
+#endif
+}

=== modified file 'storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp'
--- a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp	2010-11-28 11:34:01 +0000
+++ b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp	2010-12-17 10:14:04 +0000
@@ -213,11 +213,20 @@ Ndbd_mem_manager::Ndbd_mem_manager()
 }
 
 /**
+ *
+ * resource 0 has following semantics:
+ *
+ * m_min  - remaining reserved for other resources
+ * m_curr - sum(m_curr) for other resources (i.e total in use)
+ * m_max  - totally allocated from OS
+ *
+ * resource N has following semantics:
+ *
  * m_min = reserved
- * m_curr = current
+ * m_curr = currently used
  * m_max = max alloc, 0 = no limit
+ *
  */
-
 void
 Ndbd_mem_manager::set_resource_limit(const Resource_limit& rl)
 {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas:4063 to 4065) Jonas Oreland17 Dec