Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
- "*"
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pkg/sentry/pgalloc/pgalloc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 4 additions & 1 deletion pkg/sentry/state/stateio/pagesfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/workspace_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)}"
Loading