#include <buf0buf.h>
Public Attributes | |
page_zip_des_t | zip |
buf_page_t * | hash |
General fields | |
None of these bit-fields must be modified without holding buf_page_get_mutex() [buf_block_struct::mutex or buf_pool->zip_mutex], since they can be stored in the same machine word. Some of these fields are additionally protected by buf_pool->mutex. | |
unsigned | space:32 |
unsigned | offset:32 |
unsigned | state:3 |
unsigned | flush_type:2 |
unsigned | io_fix:2 |
unsigned | buf_fix_count:19 |
unsigned | buf_pool_index:6 |
Page flushing fields | |
ib_uint64_t | newest_modification |
ib_uint64_t | oldest_modification |
UT_LIST_NODE_T (buf_page_t) list | |
LRU replacement algorithm fields | |
These fields are protected by buf_pool->mutex only (not buf_pool->zip_mutex or buf_block_struct::mutex). | |
unsigned | old:1 |
unsigned | freed_page_clock:31 |
unsigned | access_time:32 |
UT_LIST_NODE_T (buf_page_t) LRU |
The common buffer control block structure for compressed and uncompressed frames
based on state, this is a list node, protected either by buf_pool->mutex or by buf_pool->flush_list_mutex, in one of the following lists in buf_pool:
If bpage is part of flush_list then the node pointers are covered by buf_pool->flush_list_mutex. Otherwise these pointers are protected by buf_pool->mutex.
The contents of the list node is undefined if !in_flush_list && state == BUF_BLOCK_FILE_PAGE, or if state is one of BUF_BLOCK_MEMORY, BUF_BLOCK_REMOVE_HASH or BUF_BLOCK_READY_IN_USE.
node of the LRU list
unsigned buf_page_struct::access_time |
time of first access, or 0 if the block was never accessed in the buffer pool
Definition at line 1329 of file buf0buf.h.
Referenced by buf_pool_watch_set().
unsigned buf_page_struct::buf_fix_count |
count of how manyfold this block is currently bufferfixed
Definition at line 1214 of file buf0buf.h.
Referenced by btr_search_drop_page_hash_index(), buf_flush_ready_for_replace(), buf_LRU_free_block(), buf_page_get_gen(), buf_page_get_known_nowait(), buf_page_get_zip(), buf_page_init_for_read(), buf_page_optimistic_get(), buf_page_try_get_func(), buf_pool_watch_is_sentinel(), buf_pool_watch_set(), buf_pool_watch_unset(), and buf_relocate().
unsigned buf_page_struct::buf_pool_index |
index number of the buffer pool that this block belongs to
Definition at line 1216 of file buf0buf.h.
Referenced by buf_page_init_for_read().
unsigned buf_page_struct::flush_type |
unsigned buf_page_struct::freed_page_clock |
unsigned buf_page_struct::io_fix |
type of pending I/O operation; also protected by buf_pool->mutex
Definition at line 1211 of file buf0buf.h.
Referenced by buf_LRU_free_block().
ib_uint64_t buf_page_struct::newest_modification |
log sequence number of the youngest modification to this block, zero if not modified. Protected by block mutex
Definition at line 1288 of file buf0buf.h.
Referenced by buf_pool_watch_set().
unsigned buf_page_struct::offset |
page number; also protected by buf_pool->mutex.
Definition at line 1196 of file buf0buf.h.
Referenced by buf_LRU_free_block(), buf_page_get_gen(), buf_page_init_for_read(), buf_page_io_complete(), buf_pool_watch_set(), buf_relocate(), and buf_zip_decompress().
unsigned buf_page_struct::old |
TRUE if the block is in the old blocks in buf_pool->LRU_old
Definition at line 1319 of file buf0buf.h.
Referenced by buf_LRU_make_block_young(), and buf_relocate().
ib_uint64_t buf_page_struct::oldest_modification |
log sequence number of the START of the log entry written of the oldest modification to this block which has not yet been flushed on disk; zero if all modifications are on disk. Writes to this field must be covered by both block->mutex and buf_pool->flush_list_mutex. Hence reads can happen while holding any one of the two mutexes
Definition at line 1294 of file buf0buf.h.
Referenced by buf_flush_ready_for_replace(), buf_flush_remove(), buf_LRU_free_block(), buf_pool_get_oldest_modification(), and buf_pool_watch_set().
unsigned buf_page_struct::space |
tablespace id; also protected by buf_pool->mutex.
Definition at line 1194 of file buf0buf.h.
Referenced by buf_LRU_free_block(), buf_page_get_gen(), buf_page_init_for_read(), buf_page_io_complete(), buf_pool_watch_set(), buf_relocate(), and buf_zip_decompress().
unsigned buf_page_struct::state |
state of the control block; also protected by buf_pool->mutex. State transitions from BUF_BLOCK_READY_FOR_USE to BUF_BLOCK_MEMORY need not be protected by buf_page_get_mutex().
Definition at line 1199 of file buf0buf.h.
Referenced by buf_LRU_free_block(), buf_page_get_gen(), buf_page_init_for_read(), and buf_pool_watch_set().
compressed page; zip.data (but not the data it points to) is also protected by buf_pool->mutex; state == BUF_BLOCK_ZIP_PAGE and zip.data == NULL means an active buf_pool->watch
Definition at line 1223 of file buf0buf.h.
Referenced by btr_cur_optimistic_insert(), buf_LRU_block_free_non_file_page(), buf_LRU_free_block(), buf_LRU_get_free_block(), buf_page_create(), buf_page_get_gen(), buf_page_get_zip(), buf_page_init_for_read(), buf_page_io_complete(), buf_pool_watch_is_sentinel(), buf_pool_watch_set(), buf_read_ahead_linear(), and buf_zip_decompress().