Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjstone committed Feb 22, 2024
1 parent 1d0ed8c commit bbbe079
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions sled-agent/src/instance_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ impl InstanceManager {
rx.await?
}

/// Returns the last-set size of the reservoir
pub fn reservoir_size(&self) -> ByteCount {
self.inner.vmm_reservoir_manager.reservoir_size()
}
Expand Down
3 changes: 1 addition & 2 deletions sled-agent/src/vmm_reservoir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,14 @@ impl VmmReservoirManager {
let log = log.new(o!("component" => "VmmReservoirManager"));
// We use a rendevous channel to only allow one request at a time.
// Resizing a reservoir may block the thread for up to two minutes, so
// we want to ensure, it is complete before allowing another call.
// we want to ensure it is complete before allowing another call.
let (tx, rx) = flume::bounded(0);
let reservoir_size = Arc::new(AtomicU64::new(0));
let manager = VmmReservoirManager {
reservoir_size: reservoir_size.clone(),
rx,
log,
};

let _manager_handle = thread::spawn(move || {
manager.run(hardware_manager, reservoir_mode)
});
Expand Down

0 comments on commit bbbe079

Please sign in to comment.