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

Fixed the number of chunks issue #415

Merged
merged 4 commits into from
Aug 14, 2024
Merged

Conversation

hkadayam
Copy link
Contributor

At present the number of chunk info slots pre created is incorrectly did not convert number of bytes to bits. Fixed that issue.

@hkadayam hkadayam requested a review from xiaoxichen May 11, 2024 00:18
xiaoxichen
xiaoxichen previously approved these changes May 13, 2024
Copy link
Collaborator

@xiaoxichen xiaoxichen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM through I dont really understand where the max_possible_bits comes from ?

Copy link
Collaborator

@xiaoxichen xiaoxichen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that better to hornor the requested num_bits instead of honor the serialize size?

we are now:

  1. round num_chunks to 4K boundary and convert to byte, to get bit_map_size
  2. bitmap_size - serialization_tax then convert to bit, to the Bitset size.

which is a bit disconnect between the original requests (num_chunks) and final bitmap available bits.

Considering doing

m_chunk_info_slots = std::make_unique< sisl::Bitset >(hs_super_blk::max_chunks_in_pdev(m_dev_info));

the bitmap_mem is align to align_size (512) not 4K but it should be fine right

@hkadayam
Copy link
Contributor Author

Is that better to hornor the requested num_bits instead of honor the serialize size?

we are now:

  1. round num_chunks to 4K boundary and convert to byte, to get bit_map_size
  2. bitmap_size - serialization_tax then convert to bit, to the Bitset size.

which is a bit disconnect between the original requests (num_chunks) and final bitmap available bits.

Considering doing

m_chunk_info_slots = std::make_unique< sisl::Bitset >(hs_super_blk::max_chunks_in_pdev(m_dev_info));

the bitmap_mem is align to align_size (512) not 4K but it should be fine right

Yes I adjusted the code accordingly @xiaoxichen please take a look.

src/lib/device/physical_dev.cpp Outdated Show resolved Hide resolved
src/lib/device/physical_dev.cpp Outdated Show resolved Hide resolved
src/lib/device/physical_dev.cpp Show resolved Hide resolved
Copy link
Contributor

@raakella1 raakella1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG!

@raakella1 raakella1 merged commit 0a59691 into eBay:master Aug 14, 2024
21 checks passed
@JacksonYao287
Copy link
Contributor

@raakella1 I see several commits in the master branch about this pr.
pls do squash merge next , thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create chunk failed after 44k chunks even though space available
4 participants