Commit 8e77f38e authored by marko's avatar marko

branches/zip: Make buf_block_t:old a bit-field. Document the mutex protection

of the fields "freed_page_clock" and "old".
parent 620df99d
......@@ -611,6 +611,9 @@ buf_LRU_old_init(void)
{
buf_block_t* block;
#ifdef UNIV_SYNC_DEBUG
ut_ad(mutex_own(&(buf_pool->mutex)));
#endif /* UNIV_SYNC_DEBUG */
ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == BUF_LRU_OLD_MIN_LEN);
/* We first initialize all blocks in the LRU list as old and then use
......
......@@ -809,11 +809,13 @@ struct buf_block_struct{
ulint freed_page_clock;/* the value of freed_page_clock
of the buffer pool when this block was
the last time put to the head of the
LRU list; a thread is allowed to
read this for heuristic purposes
without holding any mutex or latch */
ibool old; /* TRUE if the block is in the old
blocks in the LRU list */
LRU list; protected by buf_pool->mutex;
a thread is allowed to read this for
heuristic purposes without holding any
mutex or latch */
ulint old:1; /* TRUE if the block is in the old
blocks in the LRU list; protected
by buf_pool->mutex */
ulint accessed:1; /* TRUE if the page has been accessed
while in the buffer pool: read-ahead
may read in pages which have not been
......
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