Drizzled Public API Documentation

buf_pool_struct Struct Reference

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_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

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_tflush_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_tLRU_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_MAX]

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!

Definition at line 1522 of file buf0buf.h.

Member Function Documentation

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  )

base node of the free block 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_block_t  )

base node of the unzip_LRU list

buf_pool_struct::UT_LIST_BASE_NODE_T ( buf_page_t  )

unmodified compressed pages

buf_pool_struct::UT_LIST_BASE_NODE_T ( buf_page_t  )

buddy free lists

Member Data Documentation

buf_buddy_stat_t buf_pool_struct::buddy_stat[BUF_BUDDY_SIZES_MAX+1]

Statistics of buddy system, indexed by block size

Definition at line 1564 of file buf0buf.h.

buf_chunk_t* buf_pool_struct::chunks

buffer pool chunks

Definition at line 1546 of file buf0buf.h.

ulint buf_pool_struct::curr_pool_size

Current pool size in bytes

Definition at line 1535 of file buf0buf.h.

ulint buf_pool_struct::curr_size

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().

mutex_t buf_pool_struct::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

Definition at line 1575 of file buf0buf.h.

ib_rbt_t* buf_pool_struct::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

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().

ulint buf_pool_struct::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

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().

ulint buf_pool_struct::instance_no

Array index of this buffer pool instance

Definition at line 1532 of file buf0buf.h.

time_t buf_pool_struct::last_printout_time

when buf_print_io was last time called

Definition at line 1561 of file buf0buf.h.

Referenced by buf_refresh_io_stats().

ulint buf_pool_struct::LRU_flush_ended

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().

buf_page_t* buf_pool_struct::LRU_old

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().

ulint buf_pool_struct::LRU_old_len

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::LRU_old_ratio

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

Definition at line 1536 of file buf0buf.h.

mutex_t buf_pool_struct::mutex

Buffer pool mutex of this instance

Definition at line 1526 of file buf0buf.h.

ulint buf_pool_struct::n_chunks

number of buffer pool chunks

Definition at line 1545 of file buf0buf.h.

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().

ulint buf_pool_struct::n_pend_reads
ulint buf_pool_struct::n_pend_unzip

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().

ulint buf_pool_struct::old_pool_size

Old pool size in bytes

Definition at line 1534 of file buf0buf.h.

buf_pool_stat_t buf_pool_struct::old_stat

old statistics

Definition at line 1567 of file buf0buf.h.

Referenced by buf_refresh_io_stats().

hash_table_t* buf_pool_struct::page_hash

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().

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().

hash_table_t* buf_pool_struct::zip_hash

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

Definition at line 1552 of file buf0buf.h.

mutex_t buf_pool_struct::zip_mutex

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().


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