Commit 82c465f6 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-21962: Minor cleanup

Remove unnecessary buf_pool_t:: qualifiers. In comments,
replace buf_pool::mutex with buf_pool.mutex.

Remove an outdated comment about a planned buffer pool resizing feature.
It is already implemented in MariaDB 10.2.2 (and MySQL 5.7.9).
parent 3b250837
......@@ -159,16 +159,6 @@ The buffer frames have to be aligned so that the start memory
address of a frame is divisible by the universal page size, which
is a power of two.
We intend to make the buffer buf_pool size on-line reconfigurable,
that is, the buf_pool size can be changed without closing the database.
Then the database administarator may adjust it to be bigger
at night, for example. The control block array must
contain enough control blocks for the maximum buffer buf_pool size
which is used in the particular database.
If the buf_pool size is cut, we exploit the virtual memory mechanism of
the OS, and just refrain from using frames at high addresses. Then the OS
can swap them to disk.
The control blocks containing file pages are put to a hash table
according to the file address of the page.
We could speed up the access to an individual page by using
......@@ -1523,8 +1513,7 @@ bool buf_pool_t::create()
n_chunks= srv_buf_pool_size / srv_buf_pool_chunk_unit;
const size_t chunk_size= srv_buf_pool_chunk_unit;
chunks= static_cast<buf_pool_t::chunk_t*>(ut_zalloc_nokey(n_chunks *
sizeof *chunks));
chunks= static_cast<chunk_t*>(ut_zalloc_nokey(n_chunks * sizeof *chunks));
UT_LIST_INIT(free, &buf_page_t::list);
curr_size= 0;
auto chunk= chunks;
......@@ -3794,7 +3783,7 @@ buf_page_get_gen(
if (block != NULL) {
/* Either the page has been read in or
a watch was set on that in the window
where we released the buf_pool::mutex
where we released the buf_pool.mutex
and before we acquire the hash_lock
above. Try again. */
guess = block;
......@@ -5209,7 +5198,7 @@ void buf_pool_invalidate()
void buf_pool_t::validate()
{
buf_page_t* b;
buf_pool_t::chunk_t* chunk;
chunk_t* chunk;
ulint i;
ulint n_lru_flush = 0;
ulint n_page_flush = 0;
......@@ -5430,7 +5419,7 @@ void buf_pool_t::print()
ulint j;
index_id_t id;
ulint n_found;
buf_pool_t::chunk_t* chunk;
chunk_t* chunk;
dict_index_t* index;
size = curr_size;
......
......@@ -2004,15 +2004,15 @@ class buf_pool_t
block list, when withdrawing */
/** "hazard pointer" used during scan of LRU while doing
LRU list batch. Protected by buf_pool::mutex */
LRU list batch. Protected by buf_pool_t::mutex. */
LRUHp lru_hp;
/** Iterator used to scan the LRU list when searching for
replacable victim. Protected by buf_pool::mutex. */
replacable victim. Protected by buf_pool_t::mutex. */
LRUItr lru_scan_itr;
/** Iterator used to scan the LRU list when searching for
single page flushing victim. Protected by buf_pool::mutex. */
single page flushing victim. Protected by buf_pool_t::mutex. */
LRUItr single_scan_itr;
UT_LIST_BASE_NODE_T(buf_page_t) LRU;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment