70 const trx_t *trx,
bool strict =
true);
73#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
192#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
208#if defined UNIV_DEBUG_PRINT || defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
229 "BUF_LRU_OLD_RATIO_MIN >= BUF_LRU_OLD_RATIO_MAX");
231 "BUF_LRU_OLD_RATIO_MAX > BUF_LRU_OLD_RATIO_DIV");
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:50
void buf_LRU_flush_or_remove_pages(space_id_t id, buf_remove_t buf_remove, const trx_t *trx, bool strict=true)
Flushes all dirty pages or removes all pages belonging to a given tablespace.
Definition: buf0lru.cc:973
void buf_unzip_LRU_add_block(buf_block_t *block, bool old)
Adds a block to the LRU list of decompressed zip pages.
Definition: buf0lru.cc:1621
void buf_LRU_stat_inc_unzip()
Increments the page_zip_decompress() counter in buf_LRU_stat_cur.
Definition: buf0lru.h:259
bool buf_LRU_evict_from_unzip_LRU(buf_pool_t *buf_pool)
Determines if the unzip_LRU list should be used for evicting a victim instead of the general LRU list...
Definition: buf0lru.cc:184
void buf_LRU_make_block_old(buf_page_t *bpage)
Moves a block to the end of the LRU list.
Definition: buf0lru.cc:1731
void buf_LRU_add_block(buf_page_t *bpage, bool old)
Adds a block to the LRU list.
Definition: buf0lru.cc:1704
void buf_LRU_make_block_young(buf_page_t *bpage)
Moves a block to the start of the LRU list.
Definition: buf0lru.cc:1716
uint buf_LRU_old_ratio_update(uint old_pct, bool adjust)
Updates buf_pool->LRU_old_ratio.
Definition: buf0lru.cc:2372
constexpr uint32_t BUF_LRU_OLD_RATIO_MIN
Minimum value of buf_pool->LRU_old_ratio.
Definition: buf0lru.h:226
void buf_LRU_insert_zip_clean(buf_page_t *bpage)
Insert a compressed block into buf_pool->zip_clean in the LRU order.
Definition: buf0lru.cc:1011
void buf_LRU_adjust_hp(buf_pool_t *buf_pool, const buf_page_t *bpage)
Adjust LRU hazard pointers if needed.
Definition: buf0lru.cc:1541
void buf_LRU_validate_instance(buf_pool_t *buf_pool)
Validates the LRU list for one buffer pool instance.
Definition: buf0lru.cc:2443
void buf_LRU_block_free_non_file_page(buf_block_t *block)
Puts a block back to the free list.
Definition: buf0lru.cc:1991
buf_LRU_stat_t buf_LRU_stat_sum
Running sum of past values of buf_LRU_stat_cur.
Definition: buf0lru.cc:123
bool buf_LRU_buf_pool_running_out(void)
Returns true if less than 25 % of the buffer pool is available.
Definition: buf0lru.cc:1182
void buf_LRU_validate(void)
Validates the LRU list.
Definition: buf0lru.cc:2518
constexpr uint32_t BUF_LRU_OLD_MIN_LEN
Minimum LRU list length for which the LRU_old pointer is defined 8 megabytes of 16k pages.
Definition: buf0lru.h:58
void buf_LRU_stat_update(void)
Update the historical stats that we are collecting for LRU eviction policy at the end of each interva...
Definition: buf0lru.cc:2394
std::chrono::milliseconds get_buf_LRU_old_threshold()
Move blocks to "new" LRU list only if the first access was at least this many milliseconds ago.
Definition: buf0lru.cc:132
buf_block_t * buf_LRU_get_free_block(buf_pool_t *buf_pool)
Returns a free block from the buf_pool.
Definition: buf0lru.cc:1310
buf_LRU_stat_t buf_LRU_stat_cur
Current operation counters.
Definition: buf0lru.cc:119
bool buf_LRU_scan_and_free_block(buf_pool_t *buf_pool, bool scan_all)
Try to free a replaceable block.
Definition: buf0lru.cc:1155
buf_block_t * buf_LRU_get_free_only(buf_pool_t *buf_pool)
Returns a free block from the buf_pool.
Definition: buf0lru.cc:1204
constexpr uint32_t BUF_LRU_OLD_RATIO_DIV
The denominator of buf_pool->LRU_old_ratio.
Definition: buf0lru.h:216
bool buf_LRU_free_page(buf_page_t *bpage, bool zip)
Try to free a block.
Definition: buf0lru.cc:1740
constexpr uint32_t BUF_LRU_OLD_RATIO_MAX
Maximum value of buf_pool->LRU_old_ratio.
Definition: buf0lru.h:220
void buf_LRU_print(void)
Prints the LRU list.
Definition: buf0lru.cc:2615
Space_References buf_LRU_count_space_references()
Counts number of pages that are still in the LRU for each space instance encountered.
Definition: buf0lru.cc:2525
void buf_LRU_stat_inc_io()
Increments the I/O counter in buf_LRU_stat_cur.
Definition: buf0lru.h:257
void buf_LRU_free_one_page(buf_page_t *bpage, bool ignore_content)
Remove one page from LRU list and put it to free list.
Definition: buf0lru.cc:2309
std::map< struct fil_space_t *, size_t > Space_References
Definition: buf0lru.h:200
The database buffer pool global types for the directory.
buf_remove_t
Algorithm to remove the pages for a tablespace from the buffer pool.
Definition: buf0types.h:83
Definition: buf0buf.h:1152
Statistics for selecting the LRU list for eviction.
Definition: buf0lru.h:243
ulint unzip
Counter of page_zip_decompress operations.
Definition: buf0lru.h:245
ulint io
Counter of buffer pool I/O operations.
Definition: buf0lru.h:244
The buffer control block structure.
Definition: buf0buf.h:1750
The buffer pool structure.
Definition: buf0buf.h:2278
Definition: trx0trx.h:683
Version control for database, common definitions, and include files.
unsigned long int ulint
Definition: univ.i:405
Utilities for byte operations.