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
Conversation
@@ -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); |
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.
If I understand correct, you mean some IOs will be submit more than ones in old code. Right?
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.
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?
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.
do you really meet this case during test?
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.
Good catch!
Rebase please? |
Signed-off-by: kungf <yang.wang@easystack.cn>
411838f
to
9388de7
Compare
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