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: print aio in batch #18873

Merged
merged 1 commit into from Nov 14, 2017
Merged

Conversation

tchaikov
Copy link
Contributor

KernelDevice::aio_{submit,write,read}() are critical paths. calling
cct->_conf->subsys.should_gather() multi-times is not optimal. the
downside of this issue is that if the aio is printed, the size of
buffer in PrebufferedStreambuf could be large if the number of iov is
large, that could be a heavy load to the memory subsystem.

Signed-off-by: Kefu Chai kchai@redhat.com

@majianpeng
Copy link
Member

This PR looks more clean than #18803 .

unsigned i = 0;
os << "aio: ";
for (auto& iov : aio.iov) {
os << "\n [" << i++ << "] " << iov.iov_base << " " << iov.iov_len;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think if it makes sense to print iov_base/iov_len in hex?

Copy link
Contributor Author

@tchaikov tchaikov Nov 10, 2017

Choose a reason for hiding this comment

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

iov_base is a pointer so it's printed in hex already. but iov_len is a length, i am not sure if we should print it in hex. why shall we do so? because hex digits can be printed aligned and look better? but so do the dec digits..

Copy link
Member

Choose a reason for hiding this comment

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

everything else in bluestore is in hex (offsets and lengths). it's way easier to see block alignment etc. we should do hex here imo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks @ifed01 and @liewegas fixed and repushed

@liewegas liewegas changed the title bluestore: print aio in batch os/bluestore: print aio in batch Nov 10, 2017
os << "aio: ";
for (auto& iov : aio.iov) {
os << "\n [" << i++ << "] " << std::hex
<< iov.iov_base << " " << iov.iov_len;
Copy link
Contributor

Choose a reason for hiding this comment

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

please reset to decimal on completion to avoid potential side effects..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ifed01 fixed and repushed

KernelDevice::aio_{submit,write,read}() are critical paths. calling
cct->_conf->subsys.should_gather() multi-times is not optimal. the
downside of this issue is that if the aio is printed, the size of
buffer in PrebufferedStreambuf could be large if the number of iov is
large, that could be a heavy load to the memory subsystem.

Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov tchaikov merged commit e8df191 into ceph:master Nov 14, 2017
@tchaikov tchaikov deleted the wip-bluestore-aio-log branch November 14, 2017 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants