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/BlueStore.cc: merge overlapping/adjacent regions before read #24820

Merged
merged 1 commit into from
Nov 8, 2018
Merged

os/bluestore/BlueStore.cc: merge overlapping/adjacent regions before read #24820

merged 1 commit into from
Nov 8, 2018

Conversation

yanghonggang
Copy link
Contributor

@yanghonggang yanghonggang commented Oct 30, 2018

Fixes: http://tracker.ceph.com/issues/36625
Signed-off-by: Yang Honggang yanghonggang@umcloud.com

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

@@ -7359,13 +7359,14 @@ int main(int argc, char **argv) {
g_ceph_context->_conf.set_val_or_die("filestore_op_thread_suicide_timeout", "10000");
//g_ceph_context->_conf.set_val_or_die("filestore_fiemap", "true");
g_ceph_context->_conf.set_val_or_die("bluestore_fsck_on_mkfs", "false");
g_ceph_context->_conf.set_val_or_die("bluestore_fsck_on_mount", "false");
g_ceph_context->_conf.set_val_or_die("bluestore_fsck_on_umount", "false");
g_ceph_context->_conf.set_val_or_die("bluestore_fsck_on_mount", "true");
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these config changes intentional? I think you should rather create a test case with these settings to reproduce the issue. But I suggest to refrain from changing the settings globally.

uint64_t r_off = 0;
uint64_t r_len = 0;
bufferlist bl;
std::list<region_t> regs; // original reqeusts
Copy link
Contributor

Choose a reason for hiding this comment

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

typo

typedef list<region_t> regions2read_t;
typedef map<BlueStore::BlobRef, regions2read_t> blobs2read_t;
typedef list<read_req_t> merged_regions2read_t;
typedef map<BlueStore::BlobRef, merged_regions2read_t> blob2mread_t;
Copy link
Contributor

Choose a reason for hiding this comment

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

you may want to extend blobs2read_t instead of introducing one more map, e.g.
typedef map<BlueStore::BlobRef, pair<regions2read_t, merged_regions2read_t>>
Hence save on the second map operations(allocs, lookup etc)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@yanghonggang
Copy link
Contributor Author

@ifed01 done

@tchaikov
Copy link
Contributor

tchaikov commented Nov 5, 2018

http://pulpito.ceph.com/kchai-2018-11-05_03:11:36-rados-wip-kefu-testing-2018-11-04-1019-distro-basic-smithi/

this change could be related to the test failures. dropping it from my test batch.

…read

Fixes: http://tracker.ceph.com/issues/36625
Signed-off-by: Yang Honggang <yanghonggang@umcloud.com>
@yanghonggang
Copy link
Contributor Author

After I refined the merge logical, all StoreTest cases are passed now.

[       OK ] ObjectStore/StoreTest.mergeRegionTest/2 (1197 ms)
[----------] 66 tests from ObjectStore/StoreTest (275418 ms total)

[----------] Global test environment tear-down
[==========] 66 tests from 1 test case ran. (275418 ms total)
[  PASSED  ] 66 tests.

Please help to review. :) @ifed01 @tchaikov

@liewegas liewegas merged commit a86d560 into ceph:master Nov 8, 2018
liewegas added a commit that referenced this pull request Nov 8, 2018
* refs/pull/24820/head:
	os/bluestore/BlueStore.cc: merge overlapping/adjacent regions before read

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants