71 const trx_t *trx,
bool strict =
true);
74#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
193#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
209#if defined UNIV_DEBUG_PRINT || defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
230 "BUF_LRU_OLD_RATIO_MIN >= BUF_LRU_OLD_RATIO_MAX");
232 "BUF_LRU_OLD_RATIO_MAX > BUF_LRU_OLD_RATIO_DIV");
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:48
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:974
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:1622
void buf_LRU_stat_inc_unzip()
Increments the page_zip_decompress() counter in buf_LRU_stat_cur.
Definition: buf0lru.h:260
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:185
void buf_LRU_make_block_old(buf_page_t *bpage)
Moves a block to the end of the LRU list.
Definition: buf0lru.cc:1732
void buf_LRU_add_block(buf_page_t *bpage, bool old)
Adds a block to the LRU list.
Definition: buf0lru.cc:1705
void buf_LRU_make_block_young(buf_page_t *bpage)
Moves a block to the start of the LRU list.
Definition: buf0lru.cc:1717
uint buf_LRU_old_ratio_update(uint old_pct, bool adjust)
Updates buf_pool->LRU_old_ratio.
Definition: buf0lru.cc:2373
constexpr uint32_t BUF_LRU_OLD_RATIO_MIN
Minimum value of buf_pool->LRU_old_ratio.
Definition: buf0lru.h:227
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:1012
void buf_LRU_adjust_hp(buf_pool_t *buf_pool, const buf_page_t *bpage)
Adjust LRU hazard pointers if needed.
Definition: buf0lru.cc:1542
void buf_LRU_validate_instance(buf_pool_t *buf_pool)
Validates the LRU list for one buffer pool instance.
Definition: buf0lru.cc:2444
void buf_LRU_block_free_non_file_page(buf_block_t *block)
Puts a block back to the free list.
Definition: buf0lru.cc:1992
buf_LRU_stat_t buf_LRU_stat_sum
Running sum of past values of buf_LRU_stat_cur.
Definition: buf0lru.cc:124
bool buf_LRU_buf_pool_running_out(void)
Returns true if less than 25 % of the buffer pool is available.
Definition: buf0lru.cc:1183
void buf_LRU_validate(void)
Validates the LRU list.
Definition: buf0lru.cc:2519
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:59
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:2395
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:133
buf_block_t * buf_LRU_get_free_block(buf_pool_t *buf_pool)
Returns a free block from the buf_pool.
Definition: buf0lru.cc:1311
buf_LRU_stat_t buf_LRU_stat_cur
Current operation counters.
Definition: buf0lru.cc:120
bool buf_LRU_scan_and_free_block(buf_pool_t *buf_pool, bool scan_all)
Try to free a replaceable block.
Definition: buf0lru.cc:1156
buf_block_t * buf_LRU_get_free_only(buf_pool_t *buf_pool)
Returns a free block from the buf_pool.
Definition: buf0lru.cc:1205
constexpr uint32_t BUF_LRU_OLD_RATIO_DIV
The denominator of buf_pool->LRU_old_ratio.
Definition: buf0lru.h:217
bool buf_LRU_free_page(buf_page_t *bpage, bool zip)
Try to free a block.
Definition: buf0lru.cc:1741
constexpr uint32_t BUF_LRU_OLD_RATIO_MAX
Maximum value of buf_pool->LRU_old_ratio.
Definition: buf0lru.h:221
void buf_LRU_print(void)
Prints the LRU list.
Definition: buf0lru.cc:2616
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:2526
void buf_LRU_stat_inc_io()
Increments the I/O counter in buf_LRU_stat_cur.
Definition: buf0lru.h:258
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:2310
std::map< struct fil_space_t *, size_t > Space_References
Definition: buf0lru.h:201
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:84
Definition: buf0buf.h:1153
Statistics for selecting the LRU list for eviction.
Definition: buf0lru.h:244
ulint unzip
Counter of page_zip_decompress operations.
Definition: buf0lru.h:246
ulint io
Counter of buffer pool I/O operations.
Definition: buf0lru.h:245
The buffer control block structure.
Definition: buf0buf.h:1747
The buffer pool structure.
Definition: buf0buf.h:2275
Definition: trx0trx.h:675
Version control for database, common definitions, and include files.
unsigned long int ulint
Definition: univ.i:406
Utilities for byte operations.