Skip to content

Commit

Permalink
Address Jordan's feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
papertigers committed Nov 2, 2023
1 parent 1e1c209 commit 23a25d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions sled-agent/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ pub struct Config {
pub sidecar_revision: SidecarRevision,
/// Optional percentage of DRAM to reserve for guest memory
pub vmm_reservoir_percentage: Option<u8>,
/// Optional DRAM to reserve for guest memory in MiB (cannot be used with
/// vmm_reservoir_percentage).
/// Optional DRAM to reserve for guest memory in MiB (mutually exclusive
/// option with vmm_reservoir_percentage).
pub vmm_reservoir_size_mb: Option<u32>,
/// Optional swap device size in GiB
pub swap_device_size_gb: Option<u32>,
Expand Down
3 changes: 2 additions & 1 deletion sled-agent/src/instance_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ impl InstanceManager {
ReservoirMode::Percentage(percent) => {
if !matches!(percent, 1..=99) {
return Err(Error::ReservoirConfig(format!(
"reservoir percentage of {} must be between 0 and 100",
"VMM reservoir percentage of {} must be between 0 and \
100",
percent
)));
};
Expand Down
4 changes: 2 additions & 2 deletions sled-agent/src/sled_agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ impl SledAgent {
(Some(p), None) => ReservoirMode::Percentage(p),
(None, Some(mb)) => ReservoirMode::Size(mb),
(Some(_), Some(_)) => panic!(
"cannot specify vmm_reservoir_percentage and \
vmm_reservoir_size_mb at the same time"
"only one of vmm_reservoir_percentage and \
vmm_reservoir_size_mb is allowed"
),
};

Expand Down

0 comments on commit 23a25d6

Please sign in to comment.