Commit dfe6cdda authored by marko's avatar marko

branches/zip: Add Doxygen comments to the rest of buf0*.

parent 1abba6b4
......@@ -76,6 +76,7 @@ struct buf_buddy_stat_struct {
ib_uint64_t relocated_usec;
};
/** Statistics of buddy blocks of a given size. */
typedef struct buf_buddy_stat_struct buf_buddy_stat_t;
/** Statistics of the buddy system, indexed by block size.
......
......@@ -242,7 +242,7 @@ buf_page_get_known_nowait(
Given a tablespace id and page number tries to get that page. If the
page is not in the buffer pool it is not loaded and NULL is returned.
Suitable for using when holding the kernel mutex. */
UNIV_INTERN
const buf_block_t*
buf_page_try_get_func(
/*==================*/
......@@ -252,6 +252,12 @@ buf_page_try_get_func(
ulint line, /*!< in: line where called */
mtr_t* mtr); /*!< in: mini-transaction */
/** Tries to get a page. If the page is not in the buffer pool it is
not loaded. Suitable for using when holding the kernel mutex.
@param space_id in: tablespace id
@param page_no in: page number
@param mtr in: mini-transaction
@return the page if in buffer pool, NULL if not */
#define buf_page_try_get(space_id, page_no, mtr) \
buf_page_try_get_func(space_id, page_no, __FILE__, __LINE__, mtr);
......@@ -928,10 +934,16 @@ buf_pointer_is_block_field(
/*=======================*/
const void* ptr); /*!< in: pointer not
dereferenced */
#define buf_pool_is_block_mutex(m) \
buf_pointer_is_block_field((void *)(m))
#define buf_pool_is_block_lock(l) \
buf_pointer_is_block_field((void *)(l))
/** Find out if a pointer corresponds to a buf_block_t::mutex.
@param m in: mutex candidate
@return TRUE if m is a buf_block_t::mutex */
#define buf_pool_is_block_mutex(m) \
buf_pointer_is_block_field((const void*)(m))
/** Find out if a pointer corresponds to a buf_block_t::lock.
@param l in: rw-lock candidate
@return TRUE if l is a buf_block_t::lock */
#define buf_pool_is_block_lock(l) \
buf_pointer_is_block_field((const void*)(l))
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
/*********************************************************************//**
......
......@@ -68,10 +68,10 @@ buf_LRU_buf_pool_running_out(void);
These are low-level functions
#########################################################################*/
/* Minimum LRU list length for which the LRU_old pointer is defined */
/** Minimum LRU list length for which the LRU_old pointer is defined */
#define BUF_LRU_OLD_MIN_LEN 80
/** Maximum LRU list search length in buf_flush_LRU_recommendation() */
#define BUF_LRU_FREE_SEARCH_LEN (5 + 2 * BUF_READ_AHEAD_AREA)
/******************************************************************//**
......@@ -227,18 +227,18 @@ buf_LRU_print(void);
/*===============*/
#endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */
/******************************************************************//**
/** @brief Statistics for selecting the LRU list for eviction.
These statistics are not 'of' LRU but 'for' LRU. We keep count of I/O
and page_zip_decompress() operations. Based on the statistics we decide
if we want to evict from buf_pool->unzip_LRU or buf_pool->LRU. */
/** Statistics for selecting the LRU list for eviction. */
struct buf_LRU_stat_struct
{
ulint io; /**< Counter of buffer pool I/O operations. */
ulint unzip; /**< Counter of page_zip_decompress operations. */
};
/** Statistics for selecting the LRU list for eviction. */
typedef struct buf_LRU_stat_struct buf_LRU_stat_t;
/** Current operation counters. Not protected by any mutex.
......
......@@ -124,14 +124,16 @@ buf_read_recv_pages(
ulint n_stored); /*!< in: number of page numbers
in the array */
/* The size in pages of the area which the read-ahead algorithms read if
/** The size in pages of the area which the read-ahead algorithms read if
invoked */
#define BUF_READ_AHEAD_AREA \
ut_min(64, ut_2_power_up(buf_pool->curr_size / 32))
/* Modes used in read-ahead */
/** @name Modes used in read-ahead @{ */
/** read only pages belonging to the insert buffer tree */
#define BUF_READ_IBUF_PAGES_ONLY 131
/** read any page */
#define BUF_READ_ANY_PAGE 132
/* @} */
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment