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: fix memory leak during bit_alloc testing #9935
os/bluestore: fix memory leak during bit_alloc testing #9935
Conversation
8a8260f
to
d9b5fcc
Compare
@chhabaramesh Can you look? Thanks! |
d9b5fcc
to
eee408b
Compare
@xiexingguo , I will review today. |
@@ -971,6 +971,7 @@ OPTION(bluestore_kvbackend, OPT_STR, "rocksdb") | |||
OPTION(bluestore_allocator, OPT_STR, "bitmap") // stupid | bitmap | |||
OPTION(bluestore_freelist_type, OPT_STR, "bitmap") // extent | bitmap | |||
OPTION(bluestore_freelist_blocks_per_key, OPT_INT, 128) | |||
OPTION(bluestore_bitmapallocator_blocks_per_zone, OPT_INT, 1024) |
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.
Add a comment on configurable valid values.
Rest in this commit looks good.
eee408b
to
f36fb04
Compare
@chhabaramesh I have done upgrading this patch as the way you wish, and it works now. I am sorry that the commits are ordered and there is no easy way to rebase. So it may take you some time to review all of them, again. Also I run through the UT manually in my local testbed, since Jenkins is unhappy agian, see below:
|
@chhabaramesh |
@@ -23,8 +23,7 @@ BitMapAllocator::BitMapAllocator(int64_t device_size, int64_t block_size) | |||
: m_num_uncommitted(0), | |||
m_num_committing(0) | |||
{ | |||
int64_t zone_size_blks = 1024; // Change it later | |||
|
|||
int64_t zone_size_blks = g_conf->bluestore_bitmapallocator_blocks_per_zone; |
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.
Looks good
@xiexingguo , I am sorry but it is really difficult to review so many commits with one or two line changes.
|
@chhabaramesh Okay, I'll try to re-organize these changes, please hold on. |
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
So we are be able change total_blocks or zone_size flexibly and thus append more test cases. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
7c4e258
to
bf79a9e
Compare
@chhabaramesh See again? It is pretty clear now, I guess. |
@xiexingguo , please separate the configurable zone size and span size changes and changes related to that in separate single commit. Rest small fixes can be single commit. You can squash the changes in to single commit |
@chhabaramesh What do you mean? I have done just as you suggested. |
@chhabaramesh There are only 5 commits left, mind you. |
@xiexingguo apologies, I looked at older version, will review by EOD. |
@chhabaramesh ... seems you apology to the wrong person, but never mind:-) |
:) |
@@ -707,7 +707,7 @@ void BitMapAreaIN::init(int64_t total_blocks, int64_t area_idx, bool def) | |||
BitMapArea **children = new BitMapArea*[num_child]; | |||
int i = 0; | |||
for (i = 0; i < num_child - 1; i++) { | |||
if (m_level <= 2) { | |||
if (m_level < 2) { |
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.
Level 0 is zone, level 1 is leaf. So when this node is <= 2 ( non leaf and not zone) we create child as leaf. Looks correct to me
retest this please |
@xiexingguo , please create separate pull request for first three changes and those can be merged.
@liewegas first three commits are ok to go:
|
@chhabaramesh |
Will drop that one now, thanks! @chhabaramesh |
bf79a9e
to
f35b05b
Compare
@liewegas This one is safe to merge now. |
Perviously as zone_size_block and span_size are identical, so we could use
span_size only to simplify the calcuation.
Now that the zone_size_block and span_size are both configurable, so
it is necessary to treat them respectively.