mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:00:52 +01:00
[PR #1878] RT-QUEUE31-CPU-SOURCE-ALIAS: preserve CPU-backed pages in batch remaps #1890
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1890
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1878
Author: @lixonik
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/queue31-cpu-source-alias📝 Commits (1)
5108a02Resolve batch page-copy sources through their CPU aliases📊 Changes
2 files changed (+17 additions, -6 deletions)
View changed files
📝
runtime/shims/xmem.cpp(+9 -6)📝
runtime/test/xmem_test.cpp(+8 -0)📄 Description
Claimed in the coordination issue as: RT-QUEUE31-CPU-SOURCE-ALIAS
What and why
CopyPageMappingsBatchXlooked up pool pages only at the GPU address. When a GPU-only source page was backed through its paired CPU view, the batch treated it as a hole. It could return success while leaving the destination unmapped. This is on the streaming path used during story load.The batch and single-range copies now share the source lookup. It checks the direct mapping first and falls back to the paired CPU view for legacy paired ranges. An unmapped source with no CPU backing is still a hole.
Tested
xmem_testwith MSVC, using the productionxmem.cppand registry. With the new regression and the old implementation, the batch returned success but the source bytes were missing at the destination. The full suite passed after the patch (482 checks) and with write watching disabled (462 checks).LEONIDA_SLOT31_RUNS=0and=1. The full optional-mode run passed on retry (482 checks); earlier runs hit intermittent memory-accounting and concurrent-view assertions. Retail world load was not tested.python -I -B scripts/run_semantic_tests.py tests/semanticpassed 6,261 tests across 489 files.GPUs tested: n/a (synthetic XMem tests)
AI-assisted.
Checklist
mainand merges cleanly.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.