Loading ndb/include/portlib/NdbMem.h +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ void NdbMem_Free(void* ptr); * NdbMem_MemLockAll * Locks virtual memory in main memory */ int NdbMem_MemLockAll(void); int NdbMem_MemLockAll(int); /** * NdbMem_MemUnlockAll Loading ndb/src/common/portlib/NdbMem.c +9 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,15 @@ void NdbMem_Free(void* ptr) } int NdbMem_MemLockAll(){ int NdbMem_MemLockAll(int i){ if (i == 1) { #if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) && defined (MCL_FUTURE) return mlockall(MCL_CURRENT | MCL_FUTURE); #else return -1; #endif } #if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) return mlockall(MCL_CURRENT); #else Loading ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp +17 −2 Original line number Diff line number Diff line Loading @@ -342,9 +342,9 @@ void Cmvmi::execSTTOR(Signal* signal) if (theStartPhase == 1){ jam(); if(theConfig.lockPagesInMainMemory()) if(theConfig.lockPagesInMainMemory() == 1) { int res = NdbMem_MemLockAll(); int res = NdbMem_MemLockAll(0); if(res != 0){ g_eventLogger.warning("Failed to memlock pages"); warningEvent("Failed to memlock pages"); Loading Loading @@ -788,6 +788,21 @@ Cmvmi::execSTART_ORD(Signal* signal) { if(globalData.theStartLevel == NodeState::SL_CMVMI){ jam(); if(theConfig.lockPagesInMainMemory() == 2) { int res = NdbMem_MemLockAll(1); if(res != 0) { g_eventLogger.warning("Failed to memlock pages"); warningEvent("Failed to memlock pages"); } else { g_eventLogger.info("Locked future allocations"); } } globalData.theStartLevel = NodeState::SL_STARTING; globalData.theRestartFlag = system_started; /** Loading ndb/src/kernel/vm/Configuration.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -477,7 +477,7 @@ Configuration::setupConfiguration(){ DBUG_VOID_RETURN; } bool Uint32 Configuration::lockPagesInMainMemory() const { return _lockPagesInMainMemory; } Loading ndb/src/kernel/vm/Configuration.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public: void setupConfiguration(); void closeConfiguration(bool end_session= true); bool lockPagesInMainMemory() const; Uint32 lockPagesInMainMemory() const; int timeBetweenWatchDogCheck() const ; void timeBetweenWatchDogCheck(int value); Loading Loading
ndb/include/portlib/NdbMem.h +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ void NdbMem_Free(void* ptr); * NdbMem_MemLockAll * Locks virtual memory in main memory */ int NdbMem_MemLockAll(void); int NdbMem_MemLockAll(int); /** * NdbMem_MemUnlockAll Loading
ndb/src/common/portlib/NdbMem.c +9 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,15 @@ void NdbMem_Free(void* ptr) } int NdbMem_MemLockAll(){ int NdbMem_MemLockAll(int i){ if (i == 1) { #if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) && defined (MCL_FUTURE) return mlockall(MCL_CURRENT | MCL_FUTURE); #else return -1; #endif } #if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) return mlockall(MCL_CURRENT); #else Loading
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp +17 −2 Original line number Diff line number Diff line Loading @@ -342,9 +342,9 @@ void Cmvmi::execSTTOR(Signal* signal) if (theStartPhase == 1){ jam(); if(theConfig.lockPagesInMainMemory()) if(theConfig.lockPagesInMainMemory() == 1) { int res = NdbMem_MemLockAll(); int res = NdbMem_MemLockAll(0); if(res != 0){ g_eventLogger.warning("Failed to memlock pages"); warningEvent("Failed to memlock pages"); Loading Loading @@ -788,6 +788,21 @@ Cmvmi::execSTART_ORD(Signal* signal) { if(globalData.theStartLevel == NodeState::SL_CMVMI){ jam(); if(theConfig.lockPagesInMainMemory() == 2) { int res = NdbMem_MemLockAll(1); if(res != 0) { g_eventLogger.warning("Failed to memlock pages"); warningEvent("Failed to memlock pages"); } else { g_eventLogger.info("Locked future allocations"); } } globalData.theStartLevel = NodeState::SL_STARTING; globalData.theRestartFlag = system_started; /** Loading
ndb/src/kernel/vm/Configuration.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -477,7 +477,7 @@ Configuration::setupConfiguration(){ DBUG_VOID_RETURN; } bool Uint32 Configuration::lockPagesInMainMemory() const { return _lockPagesInMainMemory; } Loading
ndb/src/kernel/vm/Configuration.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public: void setupConfiguration(); void closeConfiguration(bool end_session= true); bool lockPagesInMainMemory() const; Uint32 lockPagesInMainMemory() const; int timeBetweenWatchDogCheck() const ; void timeBetweenWatchDogCheck(int value); Loading