• 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
buf0lru.c 32.7 KB