[RFC]: add discard support for vhd#265
Closed
AlexLanzano wants to merge 2 commits intoxapi-project:masterfrom
Closed
[RFC]: add discard support for vhd#265AlexLanzano wants to merge 2 commits intoxapi-project:masterfrom
AlexLanzano wants to merge 2 commits intoxapi-project:masterfrom
Conversation
89283c1 to
57e7c84
Compare
57e7c84 to
9520a10
Compare
Contributor
|
Yes, this is interesting but the serious performance degradation would need to be resolved. Given that the current performance of tapdisk isn't as good as we would like degrading it further even with the benefit of trim would be a step in the wrong direction. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discard is enabled when the frontend sets feature-discard to 1, the discard-granularity to the device sector size, and the discard-alignment to 0. These values will be written to the xenstore.
Discard is enabled if the following conditions are true:
How tapdisk handles discard requests:
the discard request will be converted into a blkif_request_discard.
and the vbd request is queued using tapdisk_vbd_queue_request()
The portion of my patch explained above is a slightly modified version of a previous PR 1a51656. Credit goes to Rober Breker for implementing a lot of the discard request handling for tapdisk.
How the vhd block driver handles discard requests:
be equal to the block length.
deallocate the block.
I had to change the tapdisk-queue driver from using LIO to RWIO because currently linux AIO does not support discard requests. This change causes a 50% sequential write degradation. I've attempted to remedy this by using LIO when there are no discard requests on the queue and revert back to RWIO when a discard is queued. Sadly, the IO scheduler doesn't like when you mix LIO and RWIO.
Are there any other approaches I could take? Is discard request support something you guys are interested in having?