Skip to content

Commit 717921c

Browse files
committed
Cleanup
1 parent 1dfe77c commit 717921c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ upload:
99
./scripts/upload.sh $(GCP_PROJECT_ID)
1010

1111
.PHONY: build-and-upload
12-
make build-and-upload: build upload
12+
build-and-upload: build upload

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -euo pipefail
44

5-
# The format will be: v<major>.<minor>.<patch>_g<commit_hash> — e.g. v1.7.2_g8bb88311
5+
# The format will be: v<major>.<minor>.<patch>_<commit_hash> — e.g. v1.7.2_8bb88311
66
# Extract full version from src/firecracker/swagger/firecracker.yaml
77
FC_VERSION=$(awk '/^info:/{flag=1} flag && /^ version:/{print $2; exit}' src/firecracker/swagger/firecracker.yaml)
88
commit_hash=$(git rev-parse --short=7 HEAD)

src/vmm/src/vstate/vm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ impl Vm {
251251
// This is the most important optimization - avoids repeated allocations
252252
let zero_buf = vec![0u8; page_size];
253253

254+
let sys_page_size = host_page_size();
255+
254256
for mapping in &mappings {
255257
// Find the memory region that matches this mapping
256258
let mem_region = self
@@ -264,7 +266,6 @@ impl Vm {
264266
let num_pages = region_size / page_size;
265267

266268
// Use mincore on the entire region to check residency
267-
let sys_page_size = host_page_size();
268269
let mincore_pages = region_size.div_ceil(sys_page_size);
269270
let mut mincore_vec = vec![0u8; mincore_pages];
270271

0 commit comments

Comments
 (0)