You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allocate pages of smaller-than-max_block_size() size in the page cache. #2130
Right now, pages in the cache are still of size max_block_size(). We could make them smaller when the ser_buf_size_ is smaller. We don't append to blobs in-place anyway, so there's no performance worries (right now). We would have to make sure that the caller uses the information we give it and doesn't try to write past the end of a buffer somehow. The blob code is currently the only caller we'd have to worry about.
The implementation is somewhat suboptimal because it fits with the pre-existing cache API: first we allocate a 4K-sized block, then we copy it to a block of smaller size, once its actual size is specified (if it's different).
Generally speaking, buffer cache blocks in memory are allocated to a multiple of 512 bytes.
Activity
srh commentedon Apr 16, 2014
Implemented in sam_2130 and awaiting review 1427.
srh commentedon Apr 22, 2014
Merged to next as of 81591e1.
The implementation is somewhat suboptimal because it fits with the pre-existing cache API: first we allocate a 4K-sized block, then we copy it to a block of smaller size, once its actual size is specified (if it's different).
Generally speaking, buffer cache blocks in memory are allocated to a multiple of 512 bytes.