New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os/bluestore: simplified allocator interfaces to single apis #12355
Conversation
8cbd94f
to
365c7ab
Compare
8a1f5cf
to
822fc22
Compare
@liewegas please have a look at it. While I am doing more testing on it individually, maybe we can also include this in normal runs ? |
@liewegas , this one passes the ceph_objectstore test. Please review and merge. |
|
||
ExtentList block_list = ExtentList(extents, m_block_size, max_alloc_size); | ||
|
||
while (need_blks > 0) { | ||
int64_t count = 0; | ||
count = m_bit_alloc->alloc_blocks_res( | ||
(max_blks && need_blks > max_blks) ? max_blks : need_blks, hint, &start_blk); | ||
count = m_bit_alloc->alloc_blocks_res(cont_blks, hint, &start_blk); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really inefficient.. if I'm reading this right, you're calling into alloc_blocks_res for every alloc_unit (min_alloc_size). Is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liewegas , yes you are right, I keep forgetting that min_alloc_size could change and we may fall in to this case more often than I think.
I am modifying the existing alloc_extent code to search the free extents when min_alloc_size is not equal to bit in the bitmap.
Will update you soon.
17da20f
to
2476c87
Compare
…lloc_size Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com> zone block offset related test case Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
2476c87
to
f1e9aee
Compare
d3fa7dd
to
b7b92ba
Compare
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
b7b92ba
to
9ce95bb
Compare
Signed-off-by: Ramesh Chander Ramesh.Chander@sandisk.com