InnoDB Plugin  1.0
buf_pool_t Struct Reference

The buffer pool structure. More...

#include <buf0buf.h>

Collaboration diagram for buf_pool_t:
Collaboration graph
[legend]

Data Fields

General fields
ib_mutex_t mutex
ib_mutex_t zip_mutex
ulint instance_no
ulint old_pool_size
ulint curr_pool_size
ulint LRU_old_ratio
ulint buddy_n_frames
ulint mutex_exit_forbidden
ulint n_chunks
buf_chunk_tchunks
ulint curr_size
hash_table_tpage_hash
hash_table_tzip_hash
ulint n_pend_reads
ulint n_pend_unzip
time_t last_printout_time
buf_buddy_stat_t buddy_stat [BUF_BUDDY_SIZES_MAX+1]
buf_pool_stat_t stat
buf_pool_stat_t old_stat
Page flushing algorithm fields
ib_mutex_t flush_list_mutex
const buf_page_tflush_list_hp
ut_list_base< buf_page_tflush_list
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_tflush_rbt
ulint freed_page_clock
ibool try_LRU_scan
LRU replacement algorithm fields
ut_list_base< buf_page_tfree
ut_list_base< buf_page_tLRU
buf_page_tLRU_old
ulint LRU_old_len
ut_list_base< buf_block_tunzip_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.

ut_list_base< buf_page_tzip_clean
ut_list_base< buf_buddy_free_tzip_free [BUF_BUDDY_SIZES_MAX]
buf_page_twatch

Detailed Description

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!

Field Documentation

ulint buf_pool_t::buddy_n_frames

Number of frames allocated from the buffer pool to the buddy system

buf_buddy_stat_t buf_pool_t::buddy_stat[BUF_BUDDY_SIZES_MAX+1]

Statistics of buddy system, indexed by block size

buf_chunk_t* buf_pool_t::chunks

buffer pool chunks

ulint buf_pool_t::curr_pool_size

Current pool size in bytes

ulint buf_pool_t::curr_size

current pool size in pages

ut_list_base< buf_page_t > buf_pool_t::flush_list

base node of the modified block list

const buf_page_t* buf_pool_t::flush_list_hp

"hazard pointer" used during scan of flush_list while doing flush list batch. Protected by flush_list_mutex

ib_mutex_t buf_pool_t::flush_list_mutex

mutex protecting the flush list access. This mutex protects flush_list, flush_rbt and bpage::list pointers when the bpage is on flush_list. It also protects writes to bpage::oldest_modification and flush_list_hp

ib_rbt_t* buf_pool_t::flush_rbt

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

ut_list_base< buf_page_t > buf_pool_t::free

base node of the free block list

ulint buf_pool_t::freed_page_clock

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

ibool buf_pool_t::init_flush[BUF_FLUSH_N_TYPES]

this is TRUE when a flush of the given type is being initialized

ulint buf_pool_t::instance_no

Array index of this buffer pool instance

time_t buf_pool_t::last_printout_time

when buf_print_io was last time called

ut_list_base< buf_page_t > buf_pool_t::LRU

base node of the LRU list

buf_page_t* buf_pool_t::LRU_old

pointer to the about 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

ulint buf_pool_t::LRU_old_len

length of the LRU list from the block to which LRU_old points onward, including that block; see buf0lru.cc for the restrictions on this value; 0 if LRU_old == NULL; NOTE: LRU_old_len must be adjusted whenever LRU_old shrinks or grows!

ulint buf_pool_t::LRU_old_ratio

Reserve this much of the buffer pool for "old" blocks

ib_mutex_t buf_pool_t::mutex

Buffer pool mutex of this instance

ulint buf_pool_t::mutex_exit_forbidden

Forbid release mutex

ulint buf_pool_t::n_chunks

number of buffer pool chunks

ulint buf_pool_t::n_flush[BUF_FLUSH_N_TYPES]

this is the number of pending writes in the given flush type

ulint buf_pool_t::n_pend_reads

number of pending read operations

ulint buf_pool_t::n_pend_unzip

number of pending decompressions

os_event_t buf_pool_t::no_flush[BUF_FLUSH_N_TYPES]

this is in the set state when there is no flush batch of the given type running

ulint buf_pool_t::old_pool_size

Old pool size in bytes

buf_pool_stat_t buf_pool_t::old_stat

old statistics

hash_table_t* buf_pool_t::page_hash

hash table of buf_page_t or buf_block_t file pages, buf_page_in_file() == TRUE, indexed by (space_id, offset). page_hash is protected by an array of mutexes. Changes in page_hash are protected by buf_pool->mutex and the relevant page_hash mutex. Lookups can happen while holding the buf_pool->mutex or the relevant page_hash mutex.

buf_pool_stat_t buf_pool_t::stat

current statistics

ibool buf_pool_t::try_LRU_scan

Set to FALSE when an LRU scan for free block fails. This flag is used to avoid repeated scans of LRU list when we know that there is no free block available in the scan depth for eviction. Set to TRUE whenever we flush a batch from the buffer pool. Protected by the buf_pool->mutex

ut_list_base< buf_block_t > buf_pool_t::unzip_LRU

base node of the unzip_LRU list

buf_page_t* buf_pool_t::watch

Sentinel records for buffer pool watches. Protected by buf_pool->mutex.

ut_list_base< buf_page_t > buf_pool_t::zip_clean

unmodified compressed pages

buddy free lists

hash_table_t* buf_pool_t::zip_hash

hash table of buf_block_t blocks whose frames are allocated to the zip buddy system, indexed by block->frame

ib_mutex_t buf_pool_t::zip_mutex

Zip mutex of this buffer pool instance, protects compressed only pages (of type buf_page_t, not buf_block_t


The documentation for this struct was generated from the following file: