PC-Storage: DirectStorage on Windows, io_uring on native Linux, safe portable I/O fallback #33
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ProhorovIlja--NativeX-Runtime#33
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ProhorovIlja on GitHub · 2026-11-21 23:07 UTC · original
Use implemented portable native_asset_stream fallback (PR #29) as a correctness oracle: bounded reads, future completion, cancellation, checksum and EOF protection. Implement Windows overlapped IOCP then DirectStorage with valid installed runtime/GDeflate decoder, and Linux io_uring+portable fallback on verified kernel. No assumption a retail game uses GDeflate or that direct DLL swap helps. Add deterministic source-built legal compressed data, cancel/race/queue-full/truncation/OOM tests and measure p50/p95/p99 stalls, CPU cost, actual NVMe throughput, file cache behavior. Never upload title assets/EXE into CI.
2026-11-22 portable native baseline completed
PR #29 merged a source-built portable Windows/Linux worker-thread file reader with bounded chunk sizes (4 MiB), async futures, cancellation, overflow/EOF checks, FNV-1a fixture integrity and shutdown draining. On Linux+Windows Actions run 44960097323 all tests passed: generated synthetic 2 MiB file, 64 async chunks, checksum, missing/invalid/cancelled reads and destructor futures. An additional worker startup failure cleanup patch also passed both platforms. Source docs: NATIVE_ASSET_STREAMING.
Still pending: actual DirectStorage and io_uring runtime/backend dispatch, legal format-specific codecs, GPU uploads and measured performance against the portable reference. FNV-1a is not cryptographic authentication.
@Yoshi-233 on GitHub · 2026-11-25 02:05 UTC · original
I tested the short-read case for a future Linux
io_uringbackend against the portableReaderatb3087ce0ab191227dc9e7af37cab97a0b097bb98. A request for 32 bytes returned a successful kernel completion of 7 bytes after I truncated the file. An exact-read backend needs to check the byte count before it publishes the buffer. Portable Reader range and short-read checksI built the three portable stream CTests from a clean checkout. All three passed. In a separate local probe, I submitted 64 buffered reads in batches of eight against a generated 256 KiB file. All 237,856 bytes matched both the generated input and the portable reader. The FNV-1a checksums also matched. The probe produced the same results across six runs. The host ran Ubuntu 24.04.5 x86-64, kernel
7.0.0-43-generic, and liburing 2.5 on ext4 on a SATA HDD. I confirmedio_uring_setupandio_uring_enterwithstrace.Ok, emptyInvalidRange, emptyInvalidRange, emptyInvalidRange, emptyFor the truncation case, the original file covered offset 128 through 159. I prepared the 32-byte read, truncated the file to 135 bytes, then submitted it. The 7 returned bytes matched the original data. A fresh portable request after truncation returned
InvalidRange. For a future backend, I would test that a previously validated request which reaches EOF early completes asShortReadwith an empty payload. These results cover buffered-read correctness. NVMe throughput and in-flight cancellation remain open.Minimal reproducer for the 7-byte completion
Save as
repro.con Linux with the liburing development headers installed. Runcc -O2 repro.c -o repro -luring && ./repro. Expected output isrequested=32 completed=7.