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
288af748
Commit
288af748
authored
Jun 08, 2020
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: Disable buf_page_t::access_time
parent
1b01833a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
51 deletions
+11
-51
mysql-test/suite/innodb_i_s/innodb_buffer_page_lru.result
mysql-test/suite/innodb_i_s/innodb_buffer_page_lru.result
+1
-1
storage/innobase/buf/buf0buf.cc
storage/innobase/buf/buf0buf.cc
+1
-5
storage/innobase/handler/i_s.cc
storage/innobase/handler/i_s.cc
+3
-8
storage/innobase/include/buf0buf.h
storage/innobase/include/buf0buf.h
+4
-20
storage/innobase/include/buf0buf.ic
storage/innobase/include/buf0buf.ic
+2
-17
No files found.
mysql-test/suite/innodb_i_s/innodb_buffer_page_lru.result
View file @
288af748
...
...
@@ -11,7 +11,7 @@ INNODB_BUFFER_PAGE_LRU CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE_LRU` (
`IS_HASHED` int(1) NOT NULL DEFAULT 0,
`NEWEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT 0,
`OLDEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT 0,
`ACCESS_TIME` bigint(21) unsigned
NOT NULL DEFAULT 0
,
`ACCESS_TIME` bigint(21) unsigned
DEFAULT NULL
,
`TABLE_NAME` varchar(1024) DEFAULT NULL,
`INDEX_NAME` varchar(64) DEFAULT NULL,
`NUMBER_RECORDS` bigint(21) unsigned NOT NULL DEFAULT 0,
...
...
storage/innobase/buf/buf0buf.cc
View file @
288af748
...
...
@@ -2512,7 +2512,6 @@ inline buf_page_t *buf_pool_t::watch_set(const page_id_t id,
watch when setting another watch. */
for
(
buf_page_t
*
w
=
&
watch
[
UT_ARR_SIZE
(
watch
)];
w
--
>=
watch
;
)
{
ut_ad
(
w
->
access_time
==
0
);
ut_ad
(
!
w
->
oldest_modification
());
ut_ad
(
!
w
->
zip
.
data
);
ut_ad
(
!
w
->
in_zip_hash
);
...
...
@@ -3002,7 +3001,6 @@ buf_page_get_low(
bool
allow_ibuf_merge
)
{
buf_block_t
*
block
;
unsigned
access_time
;
ulint
retries
=
0
;
const
ulint
fold
=
page_id
.
fold
();
...
...
@@ -3356,9 +3354,7 @@ buf_page_get_low(
rw_lock_x_unlock
(
hash_lock
);
buf_pool
.
n_pend_unzip
++
;
access_time
=
block
->
page
.
is_accessed
();
if
(
!
access_time
&&
!
recv_no_ibuf_operations
if
(
UNIV_UNLIKELY
(
!
recv_no_ibuf_operations
)
&&
ibuf_page_exists
(
block
->
page
.
id
(),
zip_size
))
{
block
->
page
.
ibuf_exist
=
true
;
}
...
...
storage/innobase/handler/i_s.cc
View file @
288af748
...
...
@@ -116,7 +116,6 @@ struct buf_page_info_t{
ulint
block_id
;
/*!< Buffer Pool block ID */
/** page identifier */
page_id_t
id
;
unsigned
access_time
:
32
;
/*!< Time of first access */
unsigned
io_fix
:
2
;
/*!< type of pending I/O operation */
uint32_t
fix_count
;
/*!< Count of how manyfold this block
is bufferfixed */
...
...
@@ -3996,8 +3995,7 @@ i_s_innodb_buffer_page_fill(
OK
(
fields
[
IDX_BUFFER_PAGE_OLDEST_MOD
]
->
store
(
page_info
->
oldest_mod
,
true
));
OK
(
fields
[
IDX_BUFFER_PAGE_ACCESS_TIME
]
->
store
(
page_info
->
access_time
,
true
));
fields
[
IDX_BUFFER_PAGE_ACCESS_TIME
]
->
set_null
();
fields
[
IDX_BUFFER_PAGE_TABLE_NAME
]
->
set_null
();
...
...
@@ -4168,8 +4166,6 @@ i_s_innodb_buffer_page_get_info(
page_info
->
oldest_mod
=
bpage
->
oldest_modification
();
page_info
->
access_time
=
bpage
->
access_time
;
page_info
->
zip_ssize
=
bpage
->
zip
.
ssize
;
page_info
->
io_fix
=
bpage
->
io_fix
()
&
3
;
...
...
@@ -4408,7 +4404,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] =
Column
(
"OLDEST_MODIFICATION"
,
ULonglong
(),
NOT_NULL
),
#define IDX_BUF_LRU_PAGE_ACCESS_TIME 9 + I_S_AHI
Column
(
"ACCESS_TIME"
,
ULonglong
(),
N
OT_NULL
),
Column
(
"ACCESS_TIME"
,
ULonglong
(),
N
ULLABLE
),
#define IDX_BUF_LRU_PAGE_TABLE_NAME 10 + I_S_AHI
Column
(
"TABLE_NAME"
,
Varchar
(
1024
),
NULLABLE
),
...
...
@@ -4500,8 +4496,7 @@ i_s_innodb_buf_page_lru_fill(
OK
(
fields
[
IDX_BUF_LRU_PAGE_OLDEST_MOD
]
->
store
(
page_info
->
oldest_mod
,
true
));
OK
(
fields
[
IDX_BUF_LRU_PAGE_ACCESS_TIME
]
->
store
(
page_info
->
access_time
,
true
));
fields
[
IDX_BUF_LRU_PAGE_ACCESS_TIME
]
->
set_null
();
fields
[
IDX_BUF_LRU_PAGE_TABLE_NAME
]
->
set_null
();
...
...
storage/innobase/include/buf0buf.h
View file @
288af748
...
...
@@ -930,18 +930,8 @@ class buf_page_t
purposes without holding any
mutex or latch */
/* @} */
Atomic_counter
<
unsigned
>
access_time
;
/*!< time of first access, or
0 if the block was never accessed
in the buffer pool.
For state==BUF_BLOCK_MEMORY
blocks, this field can be repurposed
for something else.
When this field counts log records
and bytes allocated for recv_sys.pages,
the field is protected by
recv_sys_t::mutex. */
/** used by recv_sys_t::add() only */
unsigned
access_time
;
/** Change buffer entries for the page exist.
Protected by io_fix()==BUF_IO_READ or by buf_block_t::lock. */
bool
ibuf_exist
;
...
...
@@ -974,7 +964,6 @@ class buf_page_t
buf_fix_count_
=
0
;
old
=
0
;
freed_page_clock
=
0
;
access_time
=
0
;
oldest_modification_
=
0
;
slot
=
nullptr
;
ibuf_exist
=
false
;
...
...
@@ -1088,15 +1077,10 @@ class buf_page_t
inline
void
set_old
(
bool
old
);
/** Flag a page accessed in buf_pool
@return whether this is not the first access */
bool
set_accessed
()
{
if
(
is_accessed
())
return
true
;
access_time
=
static_cast
<
uint32_t
>
(
ut_time_ms
());
return
false
;
}
bool
set_accessed
()
const
{
return
false
;
}
/** @return ut_time_ms() at the time of first access of a block in buf_pool
@retval 0 if not accessed */
unsigned
is_accessed
()
const
{
ut_ad
(
in_file
());
return
access_time
;
}
unsigned
is_accessed
()
const
{
ut_ad
(
in_file
());
return
0
;
}
};
/** The buffer control block structure */
...
...
storage/innobase/include/buf0buf.ic
View file @
288af748
...
...
@@ -100,23 +100,8 @@ inline bool buf_page_peek_if_too_old(const buf_page_t *bpage)
statistics or move blocks in the LRU list. This is
either the warm-up phase or an in-memory workload. */
return(FALSE);
} else if (buf_LRU_old_threshold_ms && bpage->old) {
uint32_t access_time = bpage->is_accessed();
/* It is possible that the below comparison returns an
unexpected result. 2^32 milliseconds pass in about 50 days,
so if the difference between ut_time_ms() and access_time
is e.g. 50 days + 15 ms, then the below will behave as if
it is 15 ms. This is known and fixing it would require to
increase buf_page_t::access_time from 32 to 64 bits. */
if (access_time
&& ((ib_uint32_t) (ut_time_ms() - access_time))
>= buf_LRU_old_threshold_ms) {
return(TRUE);
}
buf_pool.stat.n_pages_not_made_young++;
return false;
} else if (bpage->old && buf_LRU_old_threshold_ms) {
return true;
} else {
return !buf_page_peek_if_young(bpage);
}
...
...
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