petri: add minimal VM builder for performance testing#3012
Open
jstarks wants to merge 2 commits intomicrosoft:mainfrom
Open
petri: add minimal VM builder for performance testing#3012jstarks wants to merge 2 commits intomicrosoft:mainfrom
jstarks wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Add PetriVmBuilder::minimal() constructor that creates a VM with the bare minimum device set for performance testing: - VMBus transport + hv_sock (vsock) only - No serial ports (with_serial_output() to re-enable for diagnostics) - No ICs (shutdown, KVP, timesync), SCSI controllers, or crash dump disks - No save/restore verification on boot Supporting builder methods: - is_minimal(): query whether the builder is in minimal mode - with_serial_output(): opt in to serial ports for diagnostics The pipette-as-init cmdline gains conditional console output: when enable_serial is false (minimal mode default), console=ttyS0 is omitted from the kernel cmdline to reduce boot overhead.
jstarks
commented
Mar 16, 2026
| // ready. Otherwise, Linux will drop the input serial data | ||
| // on the floor during boot. | ||
| if matches!(firmware, Firmware::LinuxDirect { .. }) { | ||
| chipset = chipset.with_serial_wait_for_rts(); |
Member
Author
There was a problem hiding this comment.
This is not necessary when we are using pipette as init.
jstarks
commented
Mar 16, 2026
petri/src/vm/openvmm/construct.rs
Outdated
| let init = if self.uses_pipette_as_init { | ||
| "/pipette" | ||
| let (cmdline, enable_serial) = if self.uses_pipette_as_init { | ||
| let console_arg = if self.enable_serial { |
Member
Author
There was a problem hiding this comment.
Buncha weird duplicated stuff here.
jstarks
commented
Mar 16, 2026
.gitignore
Outdated
|
|
||
| # Build output directories for logview_new | ||
| **/logview_new/dist* | ||
| perf_logs/ |
- Remove unrelated .gitignore change (perf_logs/) - Skip with_serial_wait_for_rts() when using pipette as init - Deduplicate console/debug kernel cmdline logic: use the existing console variable instead of re-matching arch, and make both console and debug conditional on enable_serial - Default enable_serial to true in new() (non-minimal builder) so existing tests are unaffected - Simplify serial conditionals to use enable_serial alone, since it now fully encodes the desired behavior
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.
Add PetriVmBuilder::minimal() constructor that creates a VM with the bare minimum device set for performance testing:
Supporting builder methods:
The pipette-as-init cmdline gains conditional console output: when enable_serial is false (minimal mode default), console=ttyS0 is omitted from the kernel cmdline to reduce boot overhead.