From 8a15a79d94e2bd88bda435362ed426418461c019 Mon Sep 17 00:00:00 2001 From: Luke Lombardi <33990301+luke-lombardi@users.noreply.github.com> Date: Wed, 7 Oct 2026 18:51:54 +0000 Subject: [PATCH 1/3] Honor application huge-page policy during CUDA restore --- pkg/sentry/pgalloc/pgalloc.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/sentry/pgalloc/pgalloc.go b/pkg/sentry/pgalloc/pgalloc.go index 7c01cf7edd3..7125680331b 100644 --- a/pkg/sentry/pgalloc/pgalloc.go +++ b/pkg/sentry/pgalloc/pgalloc.go @@ -1479,6 +1479,9 @@ func (f *MemoryFile) AdviseHugepageRanges(ranges []memmap.FileRange) error { } func (f *MemoryFile) adviseHugepageRanges(ranges []memmap.FileRange) { + if !f.opts.ExpectHugepages { + return + } warned := false for _, fr := range ranges { f.forEachMappingSlice(fr, func(bs []byte) { From 1d4f66bec71b6592c659e28be10eac50bb361165 Mon Sep 17 00:00:00 2001 From: Luke Lombardi <33990301+luke-lombardi@users.noreply.github.com> Date: Wed, 7 Oct 2026 19:35:19 +0000 Subject: [PATCH 2/3] Allow an explicit compatible checkpoint version in artifact builds --- .github/workflows/build.yml | 10 +++++++++- tools/workspace_status.sh | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a37a836dbd8..cc27351d5d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,6 +2,11 @@ name: CI "on": workflow_dispatch: + inputs: + checkpoint_version: + description: 'Compatible checkpoint commit (12 hex digits; empty uses source revision)' + required: false + type: string push: branches: - "*" @@ -25,9 +30,12 @@ jobs: uses: actions/checkout@v5 - name: build + env: + CHECKPOINT_VERSION: ${{ inputs.checkpoint_version }} run: | mkdir -p bin - make copy TARGETS=runsc DESTINATION=bin/ + [[ -z "$CHECKPOINT_VERSION" || "$CHECKPOINT_VERSION" =~ ^[0-9a-f]{12}$ ]] + make copy TARGETS=runsc DESTINATION=bin/ BAZEL_OPTIONS="--workspace_status_command='tools/workspace_status.sh $CHECKPOINT_VERSION'" - name: Upload runsc uses: actions/upload-artifact@v4 diff --git a/tools/workspace_status.sh b/tools/workspace_status.sh index 62d78ed3d30..465a501525f 100755 --- a/tools/workspace_status.sh +++ b/tools/workspace_status.sh @@ -15,4 +15,4 @@ # limitations under the License. # The STABLE_ prefix will trigger a re-link if it changes. -echo STABLE_VERSION "$(git describe --always --tags --abbrev=12 --dirty 2>/dev/null || echo 0.0.0)" +echo STABLE_VERSION "${1:-$(git describe --always --tags --abbrev=12 --dirty 2>/dev/null || echo 0.0.0)}" From f5056750a788c74f5aabcb328dd4973a56b56f42 Mon Sep 17 00:00:00 2001 From: Luke Lombardi <33990301+luke-lombardi@users.noreply.github.com> Date: Wed, 7 Oct 2026 20:01:10 +0000 Subject: [PATCH 3/3] Limit contention while reading restored checkpoint pages --- pkg/sentry/state/stateio/pagesfile.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/sentry/state/stateio/pagesfile.go b/pkg/sentry/state/stateio/pagesfile.go index e65aae1fccc..df6f67f6b08 100644 --- a/pkg/sentry/state/stateio/pagesfile.go +++ b/pkg/sentry/state/stateio/pagesfile.go @@ -21,6 +21,9 @@ import ( const ( pagesFileFDDefaultMaxIOBytes = 256 << 10 pagesFileFDDefaultMaxParallel = 128 + // Keep 32 MiB in flight with fewer threads faulting restored shmem pages. + pagesFileFDDefaultMaxReadBytes = 4 << 20 + pagesFileFDDefaultMaxReadParallel = 8 ) // NewPagesFileFDReader returns a FDReader that reads a pages file from the @@ -39,7 +42,7 @@ func NewPagesFileFDReader(fd int32, maxReadBytes uint64, maxParallel int) *FDRea // the given host file descriptor, using defaults for MaxReadBytes and // MaxParallel. It takes ownership of the file descriptor. func NewPagesFileFDReaderDefault(fd int32) *FDReader { - return NewPagesFileFDReader(fd, pagesFileFDDefaultMaxIOBytes, pagesFileFDDefaultMaxParallel) + return NewPagesFileFDReader(fd, pagesFileFDDefaultMaxReadBytes, pagesFileFDDefaultMaxReadParallel) } // NewPagesFileFDWriter returns a FDWriter that writes a pages file to the