Reuse the buffer for read/write-through-propolis-heap#1006
Open
iximeow wants to merge 1 commit intooxidecomputer:masterfrom
Open
Reuse the buffer for read/write-through-propolis-heap#1006iximeow wants to merge 1 commit intooxidecomputer:masterfrom
iximeow wants to merge 1 commit intooxidecomputer:masterfrom
Conversation
iximeow
commented
Jan 7, 2026
| let iovs = [iovec { | ||
| iov_base: buf.as_mut_ptr() as *mut libc::c_void, | ||
| iov_len: buf.len(), | ||
| iov_len: total_capacity, |
Member
Author
There was a problem hiding this comment.
my first go at this change I'd missed this line in the change, and a small write from the guest went and wrote the whole much larger buffer, garbage and all, into my guest disk. I'd mentioned this morning that I was hesitant about misusing the longer-lifetime scratch buffer and it was really me still processing the shock of having bricked a test image without realizing I'd been playing with fire.
in retrospect, looking at this change, I'm much less anxious about this as a risky change, but I'm still not chomping at the bit to get this in.
Member
Author
|
phd failures are not from this change: |
this seems to have some effect, but not a lot; nothing when I/Os are all the same size, on the order of 5% better throughput when I/Os vary between 4 KiB, 32 KiB, 256 KiB, and in-between
d8fd2bc to
d1c8744
Compare
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.
this has some effect, but only in some cases; nothing when I/Os are all the same size, on the order of 5% more IOPS when I/Os vary between 4 KiB, 32 KiB, 256 KiB, and in-between.
since this is here and works I'm.. fine with merging it, but like #985 this builds on, we're just working around an OS bug, so this all gets ripped out when the OS has a real
segvmm_page{un}lock.