-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
More WriteGather fixes #109826
base: main
Are you sure you want to change the base?
More WriteGather fixes #109826
Conversation
adamsitnik
commented
Nov 14, 2024
- macOS does not define IOV_MAX, it uses UIO_MAXIOV instead
- don't run these tests in parallel, as each test cases uses more than 4 GB ram and disk
- fix the test: handle incomplete reads that should happen when we hit the max buffer limit
- incomplete write fix:
- pin the buffers only once
- when re-trying, do that only for the actual reminder
…4 GB ram and disk!
…the max buffer limit
- pin the buffers only once - when re-trying, do that only for the actual reminder
Tagging subscribers to this area: @dotnet/area-system-io |
ReadOnlyMemory<byte> buffer = buffers[i]; | ||
totalBytesToWrite += buffer.Length; | ||
|
||
MemoryHandle memoryHandle = buffer.Pin(); |
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.
So far, for incomplete writes we were pinning the memory for every retry attempt. I am not sure if this can create some kind of edge case bugs, but I think we can do it just once, before we enter the main loop
{ | ||
if (asyncMethod) | ||
{ | ||
await RandomAccess.WriteAsync(sfh, writeBuffers, fileOffset); | ||
bytesRead = await RandomAccess.ReadAsync(sfh, readBuffers, fileOffset); |
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.
this was a test bug, the test assumed that the read won't ever be a partial read
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |