1. 18 Dec, 2006 1 commit
    • marko's avatar
      branches/zip: Fix some bugs in the buddy allocator. · be083247
      marko authored
      buf_buddy_alloc_zip(): Calculate the address with char* aritmetics.
      
      buf_buddy_alloc_clean(): Acquire a mutex on the block before
      calling buf_LRU_free_block().
      
      buf_buddy_relocate(): Remove the bogus assertion about src and dst
      being buddies of each other.  Use mach_read_from_4() instead of
      page_get_space_id() and page_get_page_no() to avoid page alignment
      assertions.
      
      buf_buddy_free_low(): Replace bogus assertions.
      be083247
  2. 15 Dec, 2006 2 commits
    • marko's avatar
      branches/zip: Minor improvements. · a687ccdf
      marko authored
      buf_LRU_block_remove_hashed_page(): Return the new state of the block.
      
      Only call buf_LRU_block_free_hashed_page()
      if buf_LRU_block_remove_hashed_page() did not return BUF_BLOCK_ZIP_FREE,
      that is, the control block was not freed.
      
      buf_LRU_insert_zip_clean(): New function, for inserting a compressed-only
      block into buf_pool->zip_clean in the LRU order.
      
      buf_LRU_block_remove_hashed_page(), buf_LRU_free_block():
      Add the flag "zip" for controlling if the compressed page of an uncompressed
      page should be removed.  For now, assume zip==TRUE.
      
      buf_LRU_get_free_block(): Replace the test for UT_LIST_GET_LEN(buf_pool->free)
      with a test for the return value of buf_LRU_get_free_only().  Do not
      free zip.data, as it must already have been freed.
      
      buf_flush_insert_into_flush_list(), buf_flush_insert_sorted_into_flush_list():
      Remove compressed-only blocks from the buf_pool->zip_clean list.
      
      buf_flush_remove(): Restore compressed-only blocks to
      the buf_pool->zip_clean list.
      
      buf_page_init_for_read(): Uncompress compressed-only blocks when possible.
      Currently, there cannot be any compressed-only blocks in the buffer pool;
      they would be inserted by buf_LRU_free_block(bpage, zip=FALSE).
      a687ccdf
    • marko's avatar
      branches/zip: Minor improvements. · b6711d69
      marko authored
      buf_flush_remove(): New function, for removing a block from the flush list.
      Sliced from buf_flush_write_complete().
      
      buf_page_set_state(): Allow transitions between BUF_BLOCK_ZIP_PAGE
      and BUF_BLOCK_ZIP_DIRTY.
      b6711d69
  3. 14 Dec, 2006 1 commit
  4. 13 Dec, 2006 1 commit
    • marko's avatar
      branches/zip: Make use of the previously unused state BUF_BLOCK_MEMORY. · 2208d259
      marko authored
      buf_LRU_get_free_block(): Document that the block is in the state
      BUF_BLOCK_READY_FOR_USE.
      
      buf_block_alloc(): Change the state of the block to BUF_BLOCK_MEMORY
      and document it.
      
      Replace those invocations of buf_block_alloc() with
      buf_LRU_get_free_block() where the allocated block is used for buffer
      pool input and output.  However, temporary copies of B-tree pages
      during reorganization are not used for file I/O, and such blocks are
      still allocated with buf_block_alloc().
      2208d259
  5. 12 Dec, 2006 3 commits
  6. 11 Dec, 2006 5 commits
    • marko's avatar
      branches/zip: Make the code compile with all debugging enabled · a1b50405
      marko authored
      buf_buddy_relocate(): Replace ut_align_down() with ut_align_offset()
      in assertions.
      
      buf0buddy.h: Include buf0buf.h and sync0sync.h.
      a1b50405
    • marko's avatar
      branches/zip: Implement the whole allocation algorithm of compressed pages. · 8e3e3d16
      marko authored
      buf_LRU_free_block(): Free compressed-only pages and their
      descriptors with buf_buddy_free().
      
      buf_LRU_get_free_only(): New function for returning a block from
      buf_pool->free if one is available.  Split from buf_LRU_get_free_block().
      
      buf_buddy_alloc_zip(): Rename from buf_buddy_alloc_low() and make static.
      Remove parameter "split".  Always try to split.
      
      buf_buddy_free_block(): Rename to buf_buddy_block_free().
      
      buf_buddy_block_register(): New function for registering buf_block_t
      objects reserved by the allocator.
      
      buf_buddy_alloc_from(): New function for allocating an object from a
      bigger object, and putting the unused parts on the free list.
      
      buf_buddy_alloc_clean_zip(): New function for allocating memory by
      replacing an unmodified compressed page.
      
      buf_buddy_alloc_low(): New function for allocating memory, either from
      the free lists of compressed pages, from the global free list, or from
      unmodified pages in the buffer pool.
      8e3e3d16
    • marko's avatar
      branches/zip: buf_buddy_relocate(): Split some lines differently on · edaacca0
      marko authored
      popular demand.
      edaacca0
    • marko's avatar
      branches/zip: Add buf_pool->zip_hash for keeping track on pages allocated · 76c69c36
      marko authored
      to the buddy system for allocating compressed pages and their descriptors.
      
      buf_buddy_free_block(): New function: Deallocate the buffer frame.
      
      buf_buddy_free(), buf_buddy_free_low(): Return void instead of a pointer
      to a freed buffer frame.
      76c69c36
    • marko's avatar
      branches/zip: buf_buddy_relocate(): Relocate buf_page_t objects that represent · 2d7dc7e6
      marko authored
      clean compressed pages (BUF_BLOCK_ZIP_PAGE).
      2d7dc7e6
  7. 08 Dec, 2006 2 commits
  8. 07 Dec, 2006 6 commits
  9. 05 Dec, 2006 2 commits
  10. 04 Dec, 2006 3 commits
  11. 30 Nov, 2006 9 commits
  12. 29 Nov, 2006 2 commits
  13. 28 Nov, 2006 3 commits