List:Commits« Previous MessageNext Message »
From:jonas Date:February 23 2006 7:52pm
Subject:bk commit into 5.1 tree (jonas:1.2111)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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
  1.2111 06/02/23 20:51:58 jonas@eel.(none) +5 -0
  ndb dd
    add reporting of shared pool

  storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp
    1.6 06/02/23 20:51:52 jonas@eel.(none) +3 -2
    Add get resource usage

  storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
    1.9 06/02/23 20:51:52 jonas@eel.(none) +16 -0
    Add get resource usage

  storage/ndb/src/kernel/vm/WOPool.cpp
    1.2 06/02/23 20:51:52 jonas@eel.(none) +0 -2
    remove debug printout

  storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
    1.25 06/02/23 20:51:52 jonas@eel.(none) +2 -1
    Fix compile error

  storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
    1.29 06/02/23 20:51:52 jonas@eel.(none) +31 -0
    Add dumping of shared memory

# 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:	jonas
# Host:	eel.(none)
# Root:	/home/jonas/src/mysql-5.1-new

--- 1.1/storage/ndb/src/kernel/vm/WOPool.cpp	2006-02-23 15:09:19 +01:00
+++ 1.2/storage/ndb/src/kernel/vm/WOPool.cpp	2006-02-23 20:51:52 +01:00
@@ -38,7 +38,6 @@
 bool
 WOPool::seize_new_page(Ptr<void>& ptr)
 {
-  ndbout_c("WOPool::seize_new_page(%x)", m_record_info.m_type_id);
   WOPage* page;
   Uint32 page_no = RNIL;
   if ((page = (WOPage*)m_ctx.alloc_page(m_record_info.m_type_id, &page_no)))
@@ -63,7 +62,6 @@
 void
 WOPool::release_not_current(Ptr<void> ptr)
 {
-  ndbout_c("WOPool::release_not_current(%x)", m_record_info.m_type_id);
   WOPage* page = (WOPage*)(UintPtr(ptr.p) & ~(GLOBAL_PAGE_SIZE - 1));
   Uint32 cnt = page->m_ref_count;
   Uint32 type = page->m_type_id;

--- 1.8/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp	2006-02-23 17:54:14 +01:00
+++ 1.9/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp	2006-02-23 20:51:52 +01:00
@@ -167,12 +167,24 @@
 }
 
 bool
+Ndbd_mem_manager::get_resource_limit(Uint32 id, Resource_limit& rl) const
+{
+  if (id < XX_RL_COUNT)
+  {
+    rl = m_resource_limit[id];
+    return true;
+  }
+  return false;
+}
+
+bool
 Ndbd_mem_manager::init(bool alloc_less_memory)
 {
   assert(m_base_page == 0);
 
   Uint32 pages = 0;
   Uint32 max_page = 0;
+  Uint32 reserved = m_resource_limit[0].m_min;
   if (m_resource_limit[0].m_max)
   {
     pages = m_resource_limit[0].m_max;
@@ -267,7 +279,10 @@
     if (last > max_page)
       max_page = last;
   }
+
   m_resource_limit[0].m_resource_id = max_page;
+  m_resource_limit[0].m_min = reserved;
+  m_resource_limit[0].m_max = 0;
   
   for (Uint32 i = 0; i<cnt; i++)
   {
@@ -567,6 +582,7 @@
   Uint32 sub = (rl.m_curr < rl.m_min) ? 0 : 1; // Over min ?
   release(i, 1);
   m_resource_limit[0].m_curr = tot.m_curr - sub;
+  m_resource_limit[idx].m_curr = rl.m_curr - 1;
 }
 
 #ifdef UNIT_TEST

--- 1.5/storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp	2006-02-23 17:55:40 +01:00
+++ 1.6/storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp	2006-02-23 20:51:52 +01:00
@@ -55,7 +55,8 @@
   Ndbd_mem_manager();
   
   void set_resource_limit(const Resource_limit& rl);
-  
+  bool get_resource_limit(Uint32 id, Resource_limit& rl) const;
+
   bool init(bool allow_alloc_less_than_requested = true);
   void* get_memroot() const { return (void*)m_base_page;}
   
@@ -65,7 +66,7 @@
   void dump() const ;
   
   void* alloc_page(Uint32 type, Uint32* i);
-  void release_page(Uint32 type, Uint32 i, void * p);
+  void release_page(Uint32 type, Uint32 i);
   
   void* alloc_pages(Uint32 type, Uint32* i, Uint32 *cnt, Uint32 min = 1);
   void release_pages(Uint32 type, Uint32 i, void*p, Uint32 cnt);

--- 1.28/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2006-02-23 15:09:19 +01:00
+++ 1.29/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2006-02-23 20:51:52 +01:00
@@ -1099,6 +1099,37 @@
 	      g_sectionSegmentPool.getSize(),
 	      g_sectionSegmentPool.getNoOfFree());
   }
+
+  if (dumpState->args[0] == 1000)
+  {
+    Uint32 len = signal->getLength();
+    if (signal->getLength() == 1)
+    {
+      signal->theData[1] = 0;
+      signal->theData[2] = ~0;
+      sendSignal(reference(), GSN_DUMP_STATE_ORD, signal, 3, JBB);
+      return;
+    }
+    Uint32 id = signal->theData[1];
+    Resource_limit rl;
+    if (!m_ctx.m_mm.get_resource_limit(id, rl))
+      len = 2;
+    else
+    {
+      if (rl.m_min || rl.m_curr || rl.m_max)
+	infoEvent("Resource %d min: %d max: %d curr: %d",
+		  id, rl.m_min, rl.m_max, rl.m_curr);
+    }
+
+    if (len == 3)
+    {
+      signal->theData[0] = 1000;
+      signal->theData[1] = id+1;
+      signal->theData[2] = ~0;
+      sendSignal(reference(), GSN_DUMP_STATE_ORD, signal, 3, JBB);
+    }
+    return;
+  }
   
   if (dumpState->args[0] == DumpStateOrd::CmvmiSetRestartOnErrorInsert){
     if(signal->getLength() == 1)

--- 1.24/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp	2006-02-22 14:23:50 +01:00
+++ 1.25/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp	2006-02-23 20:51:52 +01:00
@@ -325,13 +325,14 @@
   request->action = (Request::Action) action;
   request->theTrace = signal->getTrace();
 
+  Uint32 format = fsRWReq->getFormatFlag(fsRWReq->operationFlag);
+
   if (fsRWReq->numberOfPages == 0) { //Zero pages not allowed
     jam();
     errorCode = FsRef::fsErrInvalidParameters;
     goto error;
   }
 
-  Uint32 format = fsRWReq->getFormatFlag(fsRWReq->operationFlag);
   if(format != FsReadWriteReq::fsFormatGlobalPage &&
      format != FsReadWriteReq::fsFormatSharedPage)
   {     
Thread
bk commit into 5.1 tree (jonas:1.2111)jonas23 Feb