1. 16 Jan, 2007 3 commits
  2. 15 Jan, 2007 1 commit
    • marko's avatar
      branches/zip: When adding a page to the buffer pool, add it to · 134aff29
      marko authored
      buf_pool->page_hash and buf_pool->LRU before releasing buf_pool->mutex.
      
      buf_page_init_for_read(), buf_page_create(): Allocate the compressed
      page after the block has been added to the buffer pool.  Document the
      reason for this.
      134aff29
  3. 14 Jan, 2007 1 commit
  4. 13 Jan, 2007 1 commit
  5. 12 Jan, 2007 6 commits
    • marko's avatar
      branches/zip: Improve Valgrind diagnostics. · b91b8f49
      marko authored
      buf_buddy_relocate(): Document that src may have been split and some of
      it may be in buf_pool->zip_free[j] for some j<i, thus mach_read_from_4()
      may be reading from free memory.  Check buffer pages only for addressability,
      not for being completely initialized.  Ensure that block descriptors are
      completely initialized.
      
      buf_buddy_remove_from_free(): Check prev->state and next->state in
      UNIV_DEBUG && UNIV_DEBUG_VALGRIND builds.
      
      buf_buddy_free_low(): Flag the entire block valid prior to invoking
      buf_buddy_remove_from_free() in order to avoid a Valgrind warning about
      the debug assertion on bpage->state.  Remove the Valgrind check for
      buddy being completely allocated.  If it has been split to smaller blocks,
      some of those blocks may be free.
      b91b8f49
    • marko's avatar
      branches/zip: trx_sys_create_doublewrite_buf(): Revert the change of r1208. · 8030ac37
      marko authored
      We cannot clear the page with memset(), because the page number and
      tablespace id have already been stamped on it.
      8030ac37
    • marko's avatar
      e7d8e537
    • marko's avatar
      branches/zip: Add the buf_pool->zip_free[] accessor functions · 8420d4b6
      marko authored
      buf_buddy_add_to_free() and buf_buddy_remove_from_free().
      Remove some bogus Valgrind warnings.  Improve Valgrind instrumentation.
      8420d4b6
    • marko's avatar
      branches/zip: Improve Valgrind instrumentation of allocated memory. · 5637695a
      marko authored
      UNIV_MEM_FREE(): Declare a memory area free.
      UNIV_MEM_ALLOC(): Declare a memory area allocated (but uninitialized).
      UNIV_MEM_DESC(): Associate a memory area with a control block.
      UNIV_MEM_UNDESC(): Unassociate a control block.
      
      trx_sys_create_doublewrite_buf(): Clear the buffer with memset().
      
      buf_page_init(): Add a bogus UNIV_MEM_VALID(block->frame) to silence
      valid warnings about InnoDB data pages containing uninitialized data.
      
      buf_LRU_get_free_only(): Add UNIV_MEM_ALLOC(block->frame).
      
      buf_LRU_get_free_block(): Add UNIV_MEM_DESC(block->page.zip.data, block).
      
      buf_LRU_free_block(): Add UNIV_MEM_DESC(b->zip.data, b) when allocating
      a compressed-only control block for a compressed page.
      
      buf_LRU_block_free_non_file_page(): Replace UNIV_MEM_INVALID() with
      UNIV_MEM_FREE().
      
      buf_LRU_block_remove_hashed_page(): Add UNIV_MEM_UNDESC(bpage) when
      deallocating a compressed-only control block.  Add
      UNIV_MEM_INVALID(block->frame).  (The frame should be flagged free
      by buf_LRU_block_free_non_file_page() moments later.)
      
      buf0buddy.c: Disable some extra checks in Valgrind-instrumented builds.
      Add UNIV_MEM_VALID(), UNIV_MEM_INVALID(), UNIV_MEM_FREE(), UNIV_MEM_ALLOC()
      as necessary.
      5637695a
    • marko's avatar
      branches/zip: buf_relocate(): Copy the block. Invalidate the source block. · 069514de
      marko authored
      buf_buddy_block_free(), buf_buddy_free_low(): Flag the freed bytes
      uninitialized.
      
      buf_page_init_for_read(), buf_buddy_relocate(): Do not refer to bpage
      after invoking buf_relocate().
      
      buf_buddy_relocate(): Flag src uninitialized.
      069514de
  6. 10 Jan, 2007 4 commits
  7. 09 Jan, 2007 6 commits
  8. 08 Jan, 2007 3 commits
  9. 05 Jan, 2007 7 commits
  10. 04 Jan, 2007 2 commits
    • marko's avatar
      branches/zip: Allow dirty blocks to be relocated. Allow a transition · 14b99876
      marko authored
      to BUF_BLOCK_ZIP_DIRTY (discarding the uncompressed page corresponding
      to a modified compressed page that has not been flushed to disk).
      
      buf_page_can_relocate(): New function, modelled after
      buf_flush_ready_for_replace().
      
      buf_LRU_free_block(): Allow the transition to BUF_BLOCK_ZIP_DIRTY.
      
      buf_flush_insert_into_flush_list(): Make the prototype public.
      
      buf_buddy_relocate(): Remove an unnecessary switch statement.
      Use buf_page_can_relocate() instead of buf_flush_ready_for_replace().
      
      buf_page_peek(): Made UNIV_INLINE.
      
      Document UNIV_ZIP_DEBUG.
      14b99876
    • marko's avatar
      branches/zip: Fix two bugs in the relocation of block descriptors. · 4861c59c
      marko authored
      Improve diagnostics.
      
      buf_buddy_relocate(): Do not assume all small blocks to contain only one
      buf_page_t object.  Require an exact size match, as in the case of
      compressed pages.
      
      buf_relocate(): Relocate buf_pool->LRU_old if needed.
      Validate the LRU list in debug builds.
      
      buf_LRU_block_remove_hashed_page(): Do not overwrite FIL_PAGE_OFFSET
      or FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID.  The memory will be invalidated
      in debug builds of buf_buddy_free().
      
      buf0buddy.c: Add assertions for not holding buf_pool->zip_mutex.
      The calling thread should not be holding any block->mutex, but it might
      be too time-consuming to assert against that, even #ifdef UNIV_SYNC_DEBUG.
      4861c59c
  11. 03 Jan, 2007 5 commits
    • marko's avatar
      buf_flush_validate_low(): Minor cleanup. · 903ecf37
      marko authored
      903ecf37
    • marko's avatar
      branches/zip: Before calling buf_buddy_alloc() or buf_buddy_free(), · 4b903959
      marko authored
      release any block mutexes but hold the buf_pool->mutex.
      4b903959
    • marko's avatar
      branches/zip: Use the buddy allocator for managing compressed pages. · 39e30c0b
      marko authored
      There is something wrong with the management of compressed-only blocks
      (BUF_BLOCK_ZIP_PAGE).  To disable the creation of such blocks, set zip=TRUE
      in buf_LRU_block_remove_hashed_page().
      
      buf_LRU_block_remove_hashed_page(): Release buf_pool->zip_mutex when
      freeing a compressed-only page and its control block, with buf_buddy_free().
      Adapt callers.
      
      buf_LRU_block_free_hashed_page(): Change the parameter type from buf_page_t*
      to buf_block_t*.
      
      buf_LRU_free_block(): Move below the definition of buf_LRU_add_block_low().
      Allocate block descriptor for compressed-only blocks.
      
      buf_LRU_block_free_non_file_page(): Replace ut_free() with buf_buddy_free().
      
      buf_zip_decompress(): New function, split from buf_page_io_complete().
      
      buf_page_init_for_read(): Do not allocate the compressed page until it is
      really needed, to avoid the overhead of the buddy allocator.  Decompress
      compressed-only blocks that are needed again.
      
      buf_page_create(): Do not allocate the compressed page until it is
      really needed, to avoid the overhead of the buddy allocator.
      
      buf_validate(): Replace some equality tests on the lengths of the LRU
      list and the flush lists with greater-or-equal tests, since the counted
      numbers do not include control blocks for compressed-only pages.
      39e30c0b
    • marko's avatar
      branches/zip: Add __attribute__((const)) or __attribute__((pure)) · 90b7b8ab
      marko authored
      to all fold functions.
      90b7b8ab
    • marko's avatar
      branches/zip: trx_prepare_off_kernel(): Eliminate the local variable · 2e8631ff
      marko authored
      must_flush_log, and remove warning about lsn being possibly uninitialized.
      2e8631ff
  12. 02 Jan, 2007 1 commit