Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7a133330
Commit
7a133330
authored
Jan 17, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/51-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
a441ea8b
024fa0de
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
10 deletions
+33
-10
storage/ndb/include/portlib/NdbMem.h
storage/ndb/include/portlib/NdbMem.h
+1
-1
storage/ndb/src/common/portlib/NdbMem.c
storage/ndb/src/common/portlib/NdbMem.c
+9
-1
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+17
-2
storage/ndb/src/kernel/vm/Configuration.cpp
storage/ndb/src/kernel/vm/Configuration.cpp
+1
-1
storage/ndb/src/kernel/vm/Configuration.hpp
storage/ndb/src/kernel/vm/Configuration.hpp
+1
-1
storage/ndb/src/mgmsrv/ConfigInfo.cpp
storage/ndb/src/mgmsrv/ConfigInfo.cpp
+4
-4
No files found.
storage/ndb/include/portlib/NdbMem.h
View file @
7a133330
...
...
@@ -65,7 +65,7 @@ void NdbMem_Free(void* ptr);
* NdbMem_MemLockAll
* Locks virtual memory in main memory
*/
int
NdbMem_MemLockAll
(
void
);
int
NdbMem_MemLockAll
(
int
);
/**
* NdbMem_MemUnlockAll
...
...
storage/ndb/src/common/portlib/NdbMem.c
View file @
7a133330
...
...
@@ -56,7 +56,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
...
...
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
View file @
7a133330
...
...
@@ -368,9 +368,9 @@ void Cmvmi::execSTTOR(Signal* signal)
if
(
theStartPhase
==
1
){
jam
();
if
(
m_ctx
.
m_config
.
lockPagesInMainMemory
())
if
(
m_ctx
.
m_config
.
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"
);
...
...
@@ -812,6 +812,21 @@ Cmvmi::execSTART_ORD(Signal* signal) {
if
(
globalData
.
theStartLevel
==
NodeState
::
SL_CMVMI
){
jam
();
if
(
m_ctx
.
m_config
.
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
;
/**
...
...
storage/ndb/src/kernel/vm/Configuration.cpp
View file @
7a133330
...
...
@@ -479,7 +479,7 @@ Configuration::setupConfiguration(){
DBUG_VOID_RETURN
;
}
bool
Uint32
Configuration
::
lockPagesInMainMemory
()
const
{
return
_lockPagesInMainMemory
;
}
...
...
storage/ndb/src/kernel/vm/Configuration.hpp
View file @
7a133330
...
...
@@ -36,7 +36,7 @@ public:
void
setupConfiguration
();
void
closeConfiguration
(
bool
end_session
=
true
);
bool
lockPagesInMainMemory
()
const
;
Uint32
lockPagesInMainMemory
()
const
;
int
timeBetweenWatchDogCheck
()
const
;
void
timeBetweenWatchDogCheck
(
int
value
);
...
...
storage/ndb/src/mgmsrv/ConfigInfo.cpp
View file @
7a133330
...
...
@@ -554,10 +554,10 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"If set to yes, then NDB Cluster data will not be swapped out to disk"
,
ConfigInfo
::
CI_USED
,
true
,
ConfigInfo
::
CI_
BOOL
,
"
false
"
,
"
false
"
,
"
true
"
},
ConfigInfo
::
CI_
INT
,
"
0
"
,
"
1
"
,
"
2
"
},
{
CFG_DB_WATCHDOG_INTERVAL
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment