crimson/os/seastore: create page aligned bufferptr in copy ctor of CachedExtent#53501
crimson/os/seastore: create page aligned bufferptr in copy ctor of CachedExtent#53501
Conversation
|
Probably it's more reasonable make the copy constructor of |
Yeah, you are right, I'll repush it. |
6d65cf6 to
ebd15e6
Compare
| @@ -708,8 +708,8 @@ class CachedExtent | |||
| version(other.version), | |||
| poffset(other.poffset) { | |||
| if (other.is_fully_loaded()) { | |||
There was a problem hiding this comment.
Let's add an assert to make sure the target length is already page-aligned before calling buffer::create_page_aligned(length).
(I don't see how this is possible right now) Otherwise, I think the allocation should fall back to the unaligned way to save memory.
There was a problem hiding this comment.
The allocator of seastar only guarantees alignment for power-of-two allocations. Currently, all types of extent length satisfy this limitation except for ObjectDataBlock. Seems we should take some methods to avoid this overhead.
There was a problem hiding this comment.
Thanks for the input!
Looks the power-of-two strategy is only applied when the allocation is smaller than a page: size <= max_small_allocation && align <= page_size, so ObjectDataBlock isn't actually impacted here, right?
There was a problem hiding this comment.
max_small_allocation here is 128KB, so if the length of client data is not power-of-two aligned or one 4K overwrite to an existing 128KB ObjectDataBlock, it might produce a new power-of-two not aligned ObjectDataBlock. It depends on the pattern of client IO.
Sorry that I mistook max_small_allocation as 128KB, it's 16KB actually. There is no problem with ObjectDataBlcok.
…chedExtent Signed-off-by: Zhang Song <zhangsong02@qianxin.com>
ebd15e6 to
07577e3
Compare
|
jenkins test api |
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows