[PR #1260] DirectStorage: prepare file-backed zlib on bounded workers #1292

Open
opened 2026-11-26 20:20:45 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1260
Author: @Kadamitas
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: feat/dstorage-parallel-file-zlib


📝 Commits (1)

  • e6449c4 dstorage: prepare file-backed zlib reads on bounded workers

📊 Changes

4 files changed (+358 additions, -98 deletions)

View changed files

📝 docs/directstorage.md (+14 -4)
📝 runtime/CMakeLists.txt (+3 -0)
📝 runtime/shims/dstorage.cpp (+318 -90)
📝 runtime/test/dstorage_test.cpp (+23 -4)

📄 Description

Claimed in the coordination issue as: file-backed zlib workers

What and why

Adds opt-in file-backed zlib preparation with a shared four-worker pool. It reuses the existing inflater and keeps queue commits, status, and overlapping destination writes in FIFO order. The bytes processed remain linear in the compressed and expanded sizes. The new queue bookkeeping is constant time per normally prepared request.

This adapts XCL #819 to Leonida’s existing C++ validation and queue model.

Tested

  • The native DirectStorage CTests passed with the option both enabled and disabled on Windows 11 x64.
  • A synthetic 128 MiB workload across 2,048 requests took 570.88 ms serially and 171.99 ms with four workers (median of three runs per mode). All 13 overlapping output regions matched byte for byte.
  • Built with MSVC and the static CRT. The installed MSVC toolset hits an unrelated timed-wait compile error with this baseline’s dynamic CRT configuration.

GPUs tested: n/a (CPU-only tests)

AI-assisted: yes

Checklist

  • Based on current main at branch creation.
  • One topic.
  • Synthetic test inputs and no game data.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1260 **Author:** [@Kadamitas](https://github.com/Kadamitas) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/dstorage-parallel-file-zlib` --- ### 📝 Commits (1) - [`e6449c4`](https://github.com/ubiquitarianism/leonida/commit/e6449c469a65bf48a4145ee8b2c74b8bf8671910) dstorage: prepare file-backed zlib reads on bounded workers ### 📊 Changes **4 files changed** (+358 additions, -98 deletions) <details> <summary>View changed files</summary> 📝 `docs/directstorage.md` (+14 -4) 📝 `runtime/CMakeLists.txt` (+3 -0) 📝 `runtime/shims/dstorage.cpp` (+318 -90) 📝 `runtime/test/dstorage_test.cpp` (+23 -4) </details> ### 📄 Description Claimed in the coordination issue as: [file-backed zlib workers](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7144350290) ### What and why Adds opt-in file-backed zlib preparation with a shared four-worker pool. It reuses the existing inflater and keeps queue commits, status, and overlapping destination writes in FIFO order. The bytes processed remain linear in the compressed and expanded sizes. The new queue bookkeeping is constant time per normally prepared request. This adapts [XCL #819](https://github.com/xcl-dev/xcl/pull/819) to Leonida’s existing C++ validation and queue model. ### Tested - The native DirectStorage CTests passed with the option both enabled and disabled on Windows 11 x64. - A synthetic 128 MiB workload across 2,048 requests took 570.88 ms serially and 171.99 ms with four workers (median of three runs per mode). All 13 overlapping output regions matched byte for byte. - Built with MSVC and the static CRT. The installed MSVC toolset hits an unrelated timed-wait compile error with this baseline’s dynamic CRT configuration. GPUs tested: n/a (CPU-only tests) AI-assisted: yes ### Checklist - [x] Based on current main at branch creation. - [x] One topic. - [x] Synthetic test inputs and no game data. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1292
No description provided.