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
ba875278
Commit
ba875278
authored
Feb 23, 2006
by
jonas@eel.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb dd
add reporting of shared pool
parent
47026d8e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
5 deletions
+52
-5
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+31
-0
storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
+2
-1
storage/ndb/src/kernel/vm/WOPool.cpp
storage/ndb/src/kernel/vm/WOPool.cpp
+0
-2
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
+16
-0
storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp
storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp
+3
-2
No files found.
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
View file @
ba875278
...
...
@@ -1100,6 +1100,37 @@ Cmvmi::execDUMP_STATE_ORD(Signal* signal)
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
)
m_ctx
.
m_config
.
setRestartOnErrorInsert
((
int
)
NRT_NoStart_Restart
);
...
...
storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
View file @
ba875278
...
...
@@ -325,13 +325,14 @@ Ndbfs::readWriteRequest(int action, Signal * signal)
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
)
{
...
...
storage/ndb/src/kernel/vm/WOPool.cpp
View file @
ba875278
...
...
@@ -38,7 +38,6 @@ WOPool::init(const Record_info& ri, const Pool_context& pc)
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 @@ WOPool::seize_new_page(Ptr<void>& ptr)
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
;
...
...
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
View file @
ba875278
...
...
@@ -166,6 +166,17 @@ Ndbd_mem_manager::set_resource_limit(const Resource_limit& rl)
m_resource_limit
[
0
].
m_min
=
current_reserved
+
reserve
;
}
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
)
{
...
...
@@ -173,6 +184,7 @@ Ndbd_mem_manager::init(bool alloc_less_memory)
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 @@ Ndbd_mem_manager::init(bool alloc_less_memory)
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 @@ Ndbd_mem_manager::release_page(Uint32 type, Uint32 i)
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
...
...
storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp
View file @
ba875278
...
...
@@ -55,6 +55,7 @@ public:
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 @@ public:
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
);
...
...
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