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: shrink aio submit size to pending value #17588

Merged
merged 1 commit into from Sep 10, 2017

Conversation

kungf
Copy link

@kungf kungf commented Sep 8, 2017

running_aios size may be very large in high work load, because we only submit pending aios, so we better apply pending aios size array in aio_queue_t::submit_batch.
@yangdongsheng

@liewegas need a review,please

@@ -520,7 +520,7 @@ void KernelDevice::aio_submit(IOContext *ioc)
void *priv = static_cast<void*>(ioc);
int r, retries = 0;
r = aio_queue.submit_batch(ioc->running_aios.begin(), e,
ioc->num_running.load(), priv, &retries);
pending, priv, &retries);
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand correct, you mean some IOs will be submit more than ones in old code. Right?

Copy link
Author

@kungf kungf Sep 8, 2017

Choose a reason for hiding this comment

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

hi, sorry for confused. I am not mean that, i mean there are some memory waste in struct iocb *piocb[aios_size] in submit_batch funtion.
ios were submitted from running_aios.begin() to e, no old ios were submitted. but the total io size should be pending size, but it passed num_running.load() as aios_size to aio_submit(), num_running.load >=pending, num_running.load() may be very large, so it will make memory waste, am i describe clear?

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 really meet this case during test?

Copy link
Member

@liewegas liewegas left a comment

Choose a reason for hiding this comment

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

Good catch!

@liewegas
Copy link
Member

liewegas commented Sep 8, 2017

Rebase please?

Signed-off-by: kungf <yang.wang@easystack.cn>
@liewegas liewegas merged commit 5a3133b into ceph:master Sep 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants