MDEV-24142 reduced the size of buffer pool page descriptors, but the descriptors could still be smaller. Furthermore, ROW_FORMAT=COMPRESSED pages use convoluted locking rules, because no page latch would be available for blocks whose uncompressed page has been discarded.
- The slot for the write buffer of page_compressed or encrypted tables can be moved to IORequest, because it is only needed during asynchronous page write requests.
- The frame pointer can be moved to buf_page_t. It will only be non-null for the ‘fat’ block descriptor buf_block_t.
- The lock can be moved to the ‘thin’ buf_page_t; it is only 8 bytes on Linux, OpenBSD, Windows (and other systems, to be implemented in
- The io_fix, buf_fix_count, state can be merged into a single std::atomic<uint32_t> field of page_zip_des_t, using memory that would otherwise be wasted to alignment on 64-bit systems. This field can be modified exclusively by IA-32/AMD64 friedly store(), fetch_add(), or fetch_sub().
Moving lock and frame to buf_page_t will increase its storage size, but this is more than compensated by the removal of slot, io_fix, buf_fix_count.