os/bluestore: simplified allocator interfaces to single apis #12355

Merged
merged 8 commits into from Dec 19, 2016

Projects

None yet

2 participants

@chhabaramesh
Contributor

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

@liewegas liewegas added the bluestore label Dec 8, 2016
@chhabaramesh chhabaramesh changed the title from os/bluestore: Bluefs balance should limit to alloc siz to os/bluestore: Bluefs balance should us alloc_extent api with min_alloc_size = bluefs_alloc_size Dec 8, 2016
@chhabaramesh
Contributor
chhabaramesh commented Dec 8, 2016 edited

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

@liewegas , this one passes the ceph_objectstore test. Please review and merge.

src/os/bluestore/BitMapAllocator.cc
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);
@liewegas
liewegas Dec 12, 2016 Member

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?

@chhabaramesh
chhabaramesh Dec 13, 2016 Contributor

@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 added some commits Dec 7, 2016
@chhabaramesh chhabaramesh os/bluestore:Bluefs balance should use alloc_extent api with bluefs_a…
…lloc_size

Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
6ad9814
@chhabaramesh chhabaramesh allocator alloc_extents min_alloc
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
f9338b1
@chhabaramesh chhabaramesh allocator min_alloc arguments in call stack and tests
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
8ed5ec0
@chhabaramesh chhabaramesh consolidate allocator calls to single alloc_extent api
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
2942bc6
@chhabaramesh chhabaramesh remove cont alloc alloc_blocks calls from allocator code and test
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
78b4902
@chhabaramesh chhabaramesh allocat_extent api rename and tests for new api
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
86b6ca3
@chhabaramesh chhabaramesh zone block offset bug fix and related unit test case
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>

zone block offset related test case

Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
f1e9aee
@chhabaramesh chhabaramesh changed the title from os/bluestore: Bluefs balance should us alloc_extent api with min_alloc_size = bluefs_alloc_size to os/bluestore: simplified allocator interfaces to single apis Dec 19, 2016
@chhabaramesh chhabaramesh remove unused wait argument and related function versions
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
9ce95bb
@liewegas liewegas merged commit 3649d1f into ceph:master Dec 19, 2016

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment