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
librbd: optimize away unnecessary object map updates #10332
Conversation
@neurodrone Hopefully this should resolve the mkfs discard performance issue. It needs to run through the rbd teuthology suite to ensure a regression wasn't introduced. |
That's neat! Thanks for this fix! |
@neurodrone Thanks for the traces -- made it really easy to reproduce. |
woooot, good job guys! |
librbd: optimize away unnecessary object map updates #10332
@dillaman 'Fixes: http://tracker.ceph.com/issues/16707' to "rbd-replay: decode and replay discard IO operations" commit log? |
imagectx, offset, length)); | ||
thread->issued_io(io, &m_latest_ios); | ||
ios->push_back(io); | ||
m_pending_ios[completion] = io; |
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.
@dillaman This looks like wrong for not AIO case?
Fixes: http://tracker.ceph.com/issues/16707 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Fixes: http://tracker.ceph.com/issues/16689 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
@trociny good catch -- update pushed |
@dillaman Do I understand the fix correctly, that the source of unnecessary object map updates was in send_pre() where we filtered out only updates that did not change the state, while now we also filter out updates changing state form OBJECT_NONEXISTENT to OBJECT_PENDING and from !OBJECT_PENDING to OBJECT_NONEXISTENT? Or was send_post() a source of unnecessary updates too? |
@trociny There wasn't an issue with the send_post state -- I just consolidated the logic to the same helper method. The issue was send_pre would only perform an exact check of current state against desired state. When deleting, the desired state is first the _PENDING state. Therefore, we can avoid updating the object map if our desired state is _PENDING and the current state is _NONEXISTENT. |
lgtm |
librbd: optimize away unnecessary object map updates #10332
librbd: optimize away unnecessary object map updates #10332
librbd: optimize away unnecessary object map updates #10332
No description provided.