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
bae70109
Commit
bae70109
authored
Dec 05, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: buf_page_t: Rename free_or_flush_list to list
and document the possible list memberships.
parent
db53c1eb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
30 deletions
+27
-30
buf/buf0buf.c
buf/buf0buf.c
+2
-4
buf/buf0flu.c
buf/buf0flu.c
+10
-13
buf/buf0lru.c
buf/buf0lru.c
+5
-7
include/buf0buf.h
include/buf0buf.h
+10
-6
No files found.
buf/buf0buf.c
View file @
bae70109
...
...
@@ -693,8 +693,7 @@ buf_chunk_init(
memset
(
block
->
frame
,
'\0'
,
UNIV_PAGE_SIZE
);
#endif
/* Add the block to the free list */
UT_LIST_ADD_LAST
(
free_or_flush_list
,
buf_pool
->
free
,
(
&
block
->
page
));
UT_LIST_ADD_LAST
(
list
,
buf_pool
->
free
,
(
&
block
->
page
));
ut_d
(
block
->
page
.
in_free_list
=
TRUE
);
block
++
;
...
...
@@ -794,8 +793,7 @@ buf_chunk_free(
ut_ad
(
!
block
->
page
.
in_LRU_list
);
/* Remove the block from the free list. */
ut_ad
(
block
->
page
.
in_free_list
);
UT_LIST_REMOVE
(
free_or_flush_list
,
buf_pool
->
free
,
(
&
block
->
page
));
UT_LIST_REMOVE
(
list
,
buf_pool
->
free
,
(
&
block
->
page
));
/* Free the latches. */
mutex_free
(
&
block
->
mutex
);
...
...
buf/buf0flu.c
View file @
bae70109
...
...
@@ -61,7 +61,7 @@ buf_flush_insert_into_flush_list(
||
(
UT_LIST_GET_FIRST
(
buf_pool
->
flush_list
)
->
oldest_modification
<=
bpage
->
oldest_modification
));
UT_LIST_ADD_FIRST
(
free_or_flush_
list
,
buf_pool
->
flush_list
,
bpage
);
UT_LIST_ADD_FIRST
(
list
,
buf_pool
->
flush_list
,
bpage
);
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
ut_a
(
buf_flush_validate_low
());
...
...
@@ -90,15 +90,14 @@ buf_flush_insert_sorted_into_flush_list(
while
(
b
&&
b
->
oldest_modification
>
bpage
->
oldest_modification
)
{
prev_b
=
b
;
b
=
UT_LIST_GET_NEXT
(
free_or_flush_
list
,
b
);
b
=
UT_LIST_GET_NEXT
(
list
,
b
);
}
if
(
prev_b
==
NULL
)
{
UT_LIST_ADD_FIRST
(
free_or_flush_list
,
buf_pool
->
flush_list
,
bpage
);
UT_LIST_ADD_FIRST
(
list
,
buf_pool
->
flush_list
,
bpage
);
}
else
{
UT_LIST_INSERT_AFTER
(
free_or_
flush_list
,
buf_pool
->
flush_list
,
prev_b
,
bpage
);
UT_LIST_INSERT_AFTER
(
list
,
buf_pool
->
flush_list
,
prev_b
,
bpage
);
}
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
...
...
@@ -195,10 +194,9 @@ buf_flush_write_complete(
bpage
->
oldest_modification
=
0
;
UT_LIST_REMOVE
(
free_or_flush_
list
,
buf_pool
->
flush_list
,
bpage
);
UT_LIST_REMOVE
(
list
,
buf_pool
->
flush_list
,
bpage
);
ut_d
(
UT_LIST_VALIDATE
(
free_or_flush_list
,
buf_page_t
,
buf_pool
->
flush_list
));
ut_d
(
UT_LIST_VALIDATE
(
list
,
buf_page_t
,
buf_pool
->
flush_list
));
flush_type
=
buf_page_get_flush_type
(
bpage
);
buf_pool
->
n_flush
[
flush_type
]
--
;
...
...
@@ -1000,8 +998,7 @@ buf_flush_batch(
mutex_exit
(
block_mutex
);
bpage
=
UT_LIST_GET_PREV
(
free_or_flush_list
,
bpage
);
bpage
=
UT_LIST_GET_PREV
(
list
,
bpage
);
}
}
...
...
@@ -1148,7 +1145,7 @@ buf_flush_validate_low(void)
buf_page_t
*
bpage
;
ib_uint64_t
om
;
UT_LIST_VALIDATE
(
free_or_flush_
list
,
buf_page_t
,
buf_pool
->
flush_list
);
UT_LIST_VALIDATE
(
list
,
buf_page_t
,
buf_pool
->
flush_list
);
bpage
=
UT_LIST_GET_FIRST
(
buf_pool
->
flush_list
);
...
...
@@ -1157,7 +1154,7 @@ buf_flush_validate_low(void)
ut_a
(
buf_page_in_file
(
bpage
));
ut_a
(
om
>
0
);
bpage
=
UT_LIST_GET_NEXT
(
free_or_flush_
list
,
bpage
);
bpage
=
UT_LIST_GET_NEXT
(
list
,
bpage
);
if
(
bpage
)
{
ut_a
(
om
>=
bpage
->
oldest_modification
);
...
...
buf/buf0lru.c
View file @
bae70109
...
...
@@ -138,8 +138,7 @@ buf_LRU_invalidate_tablespace(
blocks */
bpage
->
oldest_modification
=
0
;
UT_LIST_REMOVE
(
free_or_flush_list
,
buf_pool
->
flush_list
,
UT_LIST_REMOVE
(
list
,
buf_pool
->
flush_list
,
bpage
);
}
...
...
@@ -464,8 +463,7 @@ buf_LRU_get_free_block(
ut_d
(
block
->
page
.
in_free_list
=
FALSE
);
ut_ad
(
!
block
->
page
.
in_LRU_list
);
ut_a
(
!
buf_page_in_file
(
&
block
->
page
));
UT_LIST_REMOVE
(
free_or_flush_list
,
buf_pool
->
free
,
(
&
block
->
page
));
UT_LIST_REMOVE
(
list
,
buf_pool
->
free
,
(
&
block
->
page
));
if
(
buf_block_get_zip_size
(
block
)
!=
zip_size
)
{
page_zip_set_size
(
&
block
->
page
.
zip
,
zip_size
);
...
...
@@ -917,7 +915,7 @@ buf_LRU_block_free_non_file_page(
page_zip_set_size
(
&
block
->
page
.
zip
,
0
);
}
UT_LIST_ADD_FIRST
(
free_or_flush_
list
,
buf_pool
->
free
,
(
&
block
->
page
));
UT_LIST_ADD_FIRST
(
list
,
buf_pool
->
free
,
(
&
block
->
page
));
ut_d
(
block
->
page
.
in_free_list
=
TRUE
);
UNIV_MEM_INVALID
(
block
->
frame
,
UNIV_PAGE_SIZE
);
...
...
@@ -1086,11 +1084,11 @@ buf_LRU_validate(void)
ut_a
(
buf_pool
->
LRU_old_len
==
old_len
);
}
UT_LIST_VALIDATE
(
free_or_flush_
list
,
buf_page_t
,
buf_pool
->
free
);
UT_LIST_VALIDATE
(
list
,
buf_page_t
,
buf_pool
->
free
);
for
(
bpage
=
UT_LIST_GET_FIRST
(
buf_pool
->
free
);
bpage
!=
NULL
;
bpage
=
UT_LIST_GET_NEXT
(
free_or_flush_
list
,
bpage
))
{
bpage
=
UT_LIST_GET_NEXT
(
list
,
bpage
))
{
ut_a
(
buf_page_get_state
(
bpage
)
==
BUF_BLOCK_NOT_USED
);
}
...
...
include/buf0buf.h
View file @
bae70109
...
...
@@ -920,12 +920,16 @@ struct buf_page_struct{
/* 2. Page flushing fields; protected by buf_pool->mutex */
UT_LIST_NODE_T
(
buf_page_t
)
free_or_flush_list
;
/* if buf_page_in_file(), this is a
node of the modified, not yet
flushed blocks list;
if state == BUF_BLOCK_NOT_USED,
this is a node of the "free" list */
UT_LIST_NODE_T
(
buf_page_t
)
list
;
/* based on state, this is a list
node in one of the following lists
in buf_pool:
BUF_BLOCK_NOT_USED: free
BUF_BLOCK_FILE_PAGE: flush_list
BUF_BLOCK_ZIP_DIRTY: flush_list
BUF_BLOCK_ZIP_PAGE: zip_clean
BUF_BLOCK_ZIP_FREE: zip_free[] */
#ifdef UNIV_DEBUG
ibool
in_free_list
;
/* TRUE if in the free list; used in
debugging */
...
...
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