The buffer pool structure. More...
#include <buf0buf.h>
Public Attributes | |
General fields | |
mutex_t | mutex |
mutex_t | zip_mutex |
ulint | instance_no |
ulint | old_pool_size |
ulint | curr_pool_size |
ulint | LRU_old_ratio |
ulint | n_chunks |
buf_chunk_t * | chunks |
ulint | curr_size |
hash_table_t * | page_hash |
hash_table_t * | zip_hash |
ulint | n_pend_reads |
ulint | n_pend_unzip |
time_t | last_printout_time |
buf_buddy_stat_t | buddy_stat [BUF_BUDDY_SIZES+1] |
buf_pool_stat_t | stat |
buf_pool_stat_t | old_stat |
Page flushing algorithm fields | |
mutex_t | flush_list_mutex |
ibool | init_flush [BUF_FLUSH_N_TYPES] |
ulint | n_flush [BUF_FLUSH_N_TYPES] |
os_event_t | no_flush [BUF_FLUSH_N_TYPES] |
ib_rbt_t * | flush_rbt |
ulint | freed_page_clock |
ulint | LRU_flush_ended |
UT_LIST_BASE_NODE_T (buf_page_t) flush_list | |
LRU replacement algorithm fields | |
buf_page_t * | LRU_old |
ulint | LRU_old_len |
UT_LIST_BASE_NODE_T (buf_page_t) free | |
UT_LIST_BASE_NODE_T (buf_page_t) LRU | |
UT_LIST_BASE_NODE_T (buf_block_t) unzip_LRU | |
Buddy allocator fields | |
The buddy allocator is used for allocating compressed page frames and buf_page_t descriptors of blocks that exist in the buffer pool only in compressed form. | |
buf_page_t | watch [BUF_POOL_WATCH_SIZE] |
UT_LIST_BASE_NODE_T (buf_page_t) zip_clean | |
UT_LIST_BASE_NODE_T (buf_page_t) zip_free[BUF_BUDDY_SIZES] |
The buffer pool structure.
NOTE! The definition appears here only for other modules of this directory (buf) to see it. Do not use from outside!
buf_pool_struct::UT_LIST_BASE_NODE_T | ( | buf_page_t | ) |
base node of the modified block list
buf_pool_struct::UT_LIST_BASE_NODE_T | ( | buf_page_t | ) |
buddy free lists
buf_pool_struct::UT_LIST_BASE_NODE_T | ( | buf_page_t | ) |
unmodified compressed pages
buf_pool_struct::UT_LIST_BASE_NODE_T | ( | buf_block_t | ) |
base node of the unzip_LRU list
buf_pool_struct::UT_LIST_BASE_NODE_T | ( | buf_page_t | ) |
base node of the LRU list
buf_pool_struct::UT_LIST_BASE_NODE_T | ( | buf_page_t | ) |
base node of the free block list
buf_buddy_stat_t buf_pool_struct::buddy_stat[BUF_BUDDY_SIZES+1] |
current pool size in pages
Definition at line 1547 of file buf0buf.h.
Referenced by buf_LRU_buf_pool_running_out(), buf_LRU_get_free_block(), buf_read_ahead_linear(), and buf_read_ibuf_merge_pages().
a red-black tree is used exclusively during recovery to speed up insertions in the flush_list. This tree contains blocks in order of oldest_modification LSN and is kept in sync with the flush_list. Each member of the tree MUST also be on the flush_list. This tree is relevant only in recovery and is set to NULL once the recovery is over. Protected by flush_list_mutex
Definition at line 1595 of file buf0buf.h.
Referenced by buf_flush_free_flush_rbt(), buf_flush_init_flush_rbt(), buf_flush_relocate_on_flush_list(), and buf_flush_remove().
a sequence number used to count the number of buffer blocks removed from the end of the LRU list; NOTE that this counter may wrap around at 4 billion! A thread is allowed to read this for heuristic purposes without holding any mutex or latch
Definition at line 1609 of file buf0buf.h.
Referenced by buf_LRU_stat_update().
ibool buf_pool_struct::init_flush[BUF_FLUSH_N_TYPES] |
this is TRUE when a flush of the given type is being initialized
Definition at line 1586 of file buf0buf.h.
Referenced by buf_flush_write_complete().
when buf_print_io was last time called
Definition at line 1561 of file buf0buf.h.
Referenced by buf_refresh_io_stats().
when an LRU flush ends for a page, this is incremented by one; this is set to zero when a buffer block is allocated
Definition at line 1618 of file buf0buf.h.
Referenced by buf_flush_write_complete(), buf_LRU_get_free_block(), buf_LRU_search_and_free_block(), and buf_LRU_try_free_flushed_blocks().
pointer to the about buf_LRU_old_ratio/BUF_LRU_OLD_RATIO_DIV oldest blocks in the LRU list; NULL if LRU length less than BUF_LRU_OLD_MIN_LEN; NOTE: when LRU_old != NULL, its length should always equal LRU_old_len
Definition at line 1632 of file buf0buf.h.
Referenced by buf_LRU_free_block(), and buf_relocate().
length of the LRU list from the block to which LRU_old points onward, including that block; see buf0lru.c for the restrictions on this value; 0 if LRU_old == NULL; NOTE: LRU_old_len must be adjusted whenever LRU_old shrinks or grows!
Definition at line 1639 of file buf0buf.h.
Referenced by buf_LRU_free_block().
ulint buf_pool_struct::n_flush[BUF_FLUSH_N_TYPES] |
this is the number of pending writes in the given flush type
Definition at line 1589 of file buf0buf.h.
Referenced by buf_flush_write_complete(), buf_get_n_pending_ios(), and buf_pool_check_no_pending_io().
number of pending read operations
Definition at line 1556 of file buf0buf.h.
Referenced by buf_get_n_pending_ios(), buf_page_init_for_read(), buf_page_io_complete(), buf_pool_check_no_pending_io(), buf_read_ahead_linear(), buf_read_ibuf_merge_pages(), and buf_read_recv_pages().
number of pending decompressions
Definition at line 1558 of file buf0buf.h.
Referenced by buf_page_get_gen(), and buf_page_io_complete().
os_event_t buf_pool_struct::no_flush[BUF_FLUSH_N_TYPES] |
this is in the set state when there is no flush batch of the given type running
Definition at line 1592 of file buf0buf.h.
Referenced by buf_flush_wait_batch_end(), and buf_flush_write_complete().
hash table of buf_page_t or buf_block_t file pages, buf_page_in_file() == TRUE, indexed by (space_id, offset)
Definition at line 1548 of file buf0buf.h.
Referenced by buf_LRU_free_block(), buf_page_init_for_read(), buf_pool_watch_set(), and buf_relocate().
current statistics
Definition at line 1566 of file buf0buf.h.
Referenced by btr_search_guess_on_hash(), buf_get_total_stat(), buf_LRU_make_block_young(), buf_page_create(), buf_page_get_gen(), buf_page_get_known_nowait(), buf_page_get_zip(), buf_page_io_complete(), buf_page_optimistic_get(), buf_page_try_get_func(), buf_read_ahead_linear(), and buf_refresh_io_stats().
buf_page_t buf_pool_struct::watch[BUF_POOL_WATCH_SIZE] |
Sentinel records for buffer pool watches. Protected by buf_pool->mutex.
Definition at line 1663 of file buf0buf.h.
Referenced by buf_pool_watch_is_sentinel(), and buf_pool_watch_set().
Zip mutex of this buffer pool instance, protects compressed only pages (of type buf_page_t, not buf_block_t
Definition at line 1528 of file buf0buf.h.
Referenced by buf_LRU_free_block(), buf_page_get_gen(), buf_page_get_zip(), and buf_page_init_for_read().