Commit c2f40b19 authored by unknown's avatar unknown
Browse files

ndb dd

  - add resource limit to buddy allocator


storage/ndb/src/kernel/SimBlockList.cpp:
  Add emulator data to args
storage/ndb/src/kernel/blocks/record_types.hpp:
  Update record types
storage/ndb/src/kernel/main.cpp:
  Add emulator data to args
storage/ndb/src/kernel/vm/Emulator.cpp:
  Add emulator data to args
storage/ndb/src/kernel/vm/Emulator.hpp:
  Add emulator data to args
storage/ndb/src/kernel/vm/Makefile.am:
  Add emulator data to args
storage/ndb/src/kernel/vm/Pool.hpp:
  Update
storage/ndb/src/kernel/vm/SimBlockList.hpp:
  Add emulator data to args
storage/ndb/src/kernel/vm/SimulatedBlock.hpp:
  Add emulator data to args
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp:
  use resource_limit in buddy
storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp:
  Add emulator data to args
storage/ndb/src/kernel/vm/Pool.cpp:
  New BitKeeper file ``storage/ndb/src/kernel/vm/Pool.cpp''
parent 5925f7cc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

#include "SimBlockList.hpp"
#include "EmulatorData.hpp"
#include <SimulatedBlock.hpp>
#include <Cmvmi.hpp>
#include <Ndbfs.hpp>
@@ -69,7 +70,7 @@ void * operator new (size_t sz, SIMBLOCKLIST_DUMMY dummy){
#endif

void 
SimBlockList::load(Configuration & conf){
SimBlockList::load(EmulatorData& data){
  noOfBlocks = NO_OF_BLOCKS;
  theList = new SimulatedBlock * [noOfBlocks];
  Dbdict* dbdict = 0;
@@ -79,7 +80,7 @@ SimBlockList::load(Configuration & conf){
  Tsman* ts = 0;

  Block_context ctx = 
    { conf, * (Ndbd_mem_manager*)0 };
    { *data.theConfiguration, *data.m_mem_manager };
  
  SimulatedBlock * fs = 0;
  {
+17 −11
Original line number Diff line number Diff line
@@ -17,17 +17,6 @@
#ifndef KERNEL_RECORDS_HPP
#define KERNEL_RECORDS_HPP

/**
 * Record types
 */
#define PGMAN_PAGE_REQUEST      1

#define LGMAN_LOG_BUFFER_WAITER 2
#define LGMAN_LOG_SYNC_WAITER   3

#define DBTUP_PAGE_REQUEST      4
#define DBTUP_EXTENT_INFO       5

/**
 * Resource groups
 */
@@ -47,4 +36,21 @@
 */
#define RG_DISK_RECORDS         2

/**
 * 
 */
#define RG_RESERVED             0
#define RG_COUNT                3

/**
 * Record types
 */
#define PGMAN_PAGE_REQUEST      MAKE_TID(1, RG_DISK_OPERATIONS)

#define LGMAN_LOG_BUFFER_WAITER MAKE_TID(2, RG_DISK_OPERATIONS)
#define LGMAN_LOG_SYNC_WAITER   MAKE_TID(3, RG_DISK_OPERATIONS)

#define DBTUP_PAGE_REQUEST      MAKE_TID(4, RG_DISK_OPERATIONS)
#define DBTUP_EXTENT_INFO       MAKE_TID(5, RG_DISK_RECORDS)

#endif
+1 −1
Original line number Diff line number Diff line
@@ -406,7 +406,7 @@ int main(int argc, char** argv)
  systemInfo(* theConfig, * theConfig->m_logLevel); 
  
    // Load blocks
  globalEmulatorData.theSimBlockList->load(* theConfig);
  globalEmulatorData.theSimBlockList->load(globalEmulatorData);
    
  // Set thread concurrency for Solaris' light weight processes
  int status;
+6 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include "SimBlockList.hpp"

#include <NodeState.hpp>
#include "ndbd_malloc_impl.hpp"

#include <NdbMem.h>
#include <NdbMutex.h>
@@ -77,6 +78,7 @@ EmulatorData::EmulatorData(){
  theSimBlockList  = 0;
  theShutdownMutex = 0;
  m_socket_server = 0;
  m_mem_manager = 0;
}

void
@@ -93,6 +95,7 @@ EmulatorData::create(){
  theThreadConfig  = new ThreadConfig();
  theSimBlockList  = new SimBlockList();
  m_socket_server  = new SocketServer();
  m_mem_manager    = new Ndbd_mem_manager();

  theShutdownMutex = NdbMutex_Create();

@@ -111,6 +114,9 @@ EmulatorData::destroy(){
    delete theSimBlockList; theSimBlockList = 0;
  if(m_socket_server)
    delete m_socket_server; m_socket_server = 0;
  if (m_mem_manager)
    delete m_mem_manager; m_mem_manager = 0;
  
  NdbMem_Destroy();
}

+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ struct EmulatorData {
  class ThreadConfig  * theThreadConfig;
  class SimBlockList  * theSimBlockList;
  class SocketServer  * m_socket_server;
  class Ndbd_mem_manager * m_mem_manager;

  /**
   * Constructor
Loading