Fix restore sequence order - #5
Open
Edwinhr716 wants to merge 1 commit into
Open
Conversation
Edwinhr716
added a commit
to llm-d-incubation/llm-d-rl-time-slicing
that referenced
this pull request
Aug 18, 2026
Pristine copy of https://github.com/gpu-os/GPU-CR at commit e9bbb52e1f52986587fc631217c0f2b50b46245a (upstream HEAD as of 2026-08), plus a provenance README (README.llm-d.md). No upstream file is modified; nothing is wired into this repo's build or CI. Upstream is an experimental research project with limited maintenance (our upstream PR, gpu-os/GPU-CR#5, is unreviewed), so we carry a best-effort fork per Kubernetes-ecosystem practice (kubernetes/kubernetes third_party/forked/, kubernetes/klog <- golang/glog, kube-openapi pkg/validation <- go-openapi). third_party/gpu-cr is excluded from cosmetic linters; functional CI applies in full. To verify the import is pristine: git clone https://github.com/gpu-os/GPU-CR /tmp/gpu-cr-upstream git -C /tmp/gpu-cr-upstream checkout e9bbb52e1f52986587fc631217c0f2b50b46245a diff -r --exclude=.git /tmp/gpu-cr-upstream third_party/gpu-cr # only difference: the added README.llm-d.md Signed-off-by: Edwinhr716 <edandres249@gmail.com>
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.
When cuda-checkpoint attempted to restore the driver state, it encountered virtual addresses that had no physical memory mapped to them (since they were released during checkpoint). The driver state restore would fail because the underlying VMM (Virtual Memory Management) allocations and handles did not exist yet.
The patch reverses this order:
• Step 1: Signal the application to run its internal restore first. The application allocates new physical memory and remaps its virtual addresses
to it (via cuMemCreate and cuMemMap).
• Step 2: Call cuda-checkpoint --toggle to restore the CUDA driver state.
By remapping the physical memory first, the application presents a valid memory layout when cuda-checkpoint runs. The driver-level restore then succeeds because it finds the expected memory mappings and handles already re-established.