Skip to content
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

Merged
merged 8 commits into from Dec 19, 2016

Conversation

chhabaramesh
Copy link
Contributor

Signed-off-by: Ramesh Chander Ramesh.Chander@sandisk.com

@chhabaramesh chhabaramesh force-pushed the bit_alloc_mempool branch 2 times, most recently from 8cbd94f to 365c7ab Compare December 7, 2016 16:56
@chhabaramesh chhabaramesh force-pushed the bit_alloc_mempool branch 3 times, most recently from 8a1f5cf to 822fc22 Compare December 8, 2016 08:57
@chhabaramesh chhabaramesh changed the title os/bluestore: Bluefs balance should limit to alloc siz os/bluestore: Bluefs balance should us alloc_extent api with min_alloc_size = bluefs_alloc_size Dec 8, 2016
@chhabaramesh
Copy link
Contributor Author

chhabaramesh commented Dec 8, 2016

@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 ?

@chhabaramesh
Copy link
Contributor Author

@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);
Copy link
Member

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?

Copy link
Contributor Author

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.

@liewegas liewegas added this to the kraken milestone Dec 14, 2016
@chhabaramesh chhabaramesh force-pushed the bit_alloc_mempool branch 3 times, most recently from 17da20f to 2476c87 Compare December 18, 2016 18:28
…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>
@chhabaramesh chhabaramesh changed the title os/bluestore: Bluefs balance should us alloc_extent api with min_alloc_size = bluefs_alloc_size os/bluestore: simplified allocator interfaces to single apis Dec 19, 2016
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
@liewegas liewegas merged commit 3649d1f into ceph:master Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants