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
311ea6a8
Commit
311ea6a8
authored
Nov 28, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Make buf_block_t:old a bit-field. Document the mutex protection
of the fields "freed_page_clock" and "old".
parent
da966628
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
buf/buf0lru.c
buf/buf0lru.c
+3
-0
include/buf0buf.h
include/buf0buf.h
+7
-5
No files found.
buf/buf0lru.c
View file @
311ea6a8
...
@@ -611,6 +611,9 @@ buf_LRU_old_init(void)
...
@@ -611,6 +611,9 @@ buf_LRU_old_init(void)
{
{
buf_block_t
*
block
;
buf_block_t
*
block
;
#ifdef UNIV_SYNC_DEBUG
ut_ad
(
mutex_own
(
&
(
buf_pool
->
mutex
)));
#endif
/* UNIV_SYNC_DEBUG */
ut_a
(
UT_LIST_GET_LEN
(
buf_pool
->
LRU
)
==
BUF_LRU_OLD_MIN_LEN
);
ut_a
(
UT_LIST_GET_LEN
(
buf_pool
->
LRU
)
==
BUF_LRU_OLD_MIN_LEN
);
/* We first initialize all blocks in the LRU list as old and then use
/* We first initialize all blocks in the LRU list as old and then use
...
...
include/buf0buf.h
View file @
311ea6a8
...
@@ -809,11 +809,13 @@ struct buf_block_struct{
...
@@ -809,11 +809,13 @@ struct buf_block_struct{
ulint
freed_page_clock
;
/* the value of freed_page_clock
ulint
freed_page_clock
;
/* the value of freed_page_clock
of the buffer pool when this block was
of the buffer pool when this block was
the last time put to the head of the
the last time put to the head of the
LRU list; a thread is allowed to
LRU list; protected by buf_pool->mutex;
read this for heuristic purposes
a thread is allowed to read this for
without holding any mutex or latch */
heuristic purposes without holding any
ibool
old
;
/* TRUE if the block is in the old
mutex or latch */
blocks in the LRU list */
ulint
old
:
1
;
/* TRUE if the block is in the old
blocks in the LRU list; protected
by buf_pool->mutex */
ulint
accessed
:
1
;
/* TRUE if the page has been accessed
ulint
accessed
:
1
;
/* TRUE if the page has been accessed
while in the buffer pool: read-ahead
while in the buffer pool: read-ahead
may read in pages which have not been
may read in pages which have not been
...
...
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