Skip to content

Commit

Permalink
test page lock after everything
Browse files Browse the repository at this point in the history
  • Loading branch information
eaypek-tfh committed Jan 28, 2025
1 parent 2090c2f commit 0f48603
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions iris-mpc-common/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ pub struct Config {

#[serde(default)]
pub load_chunks_buffer_size: usize,

#[serde(default)]
pub page_lock_after: bool,
}

fn default_load_chunks_parallelism() -> usize {
Expand Down
6 changes: 6 additions & 0 deletions iris-mpc/src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ use std::{
},
time::{Duration, Instant},
};
use std::thread::sleep;
use telemetry_batteries::tracing::{datadog::DatadogBattery, TracingShutdownHandle};
use tokio::{
sync::{mpsc, oneshot, Semaphore},
Expand Down Expand Up @@ -1093,8 +1094,13 @@ async fn server_main(config: Config) -> eyre::Result<()> {

let device_manager_clone = actor.device_manager.clone();

let page_lock_after = config.page_lock_after;
// prepare the handle for the rest of the page locks
let page_lock_handle = spawn_blocking(move || {
if page_lock_after {
tracing::info!("Sleeping before page lock");
sleep(Duration::from_secs(120));
}
tracing::info!("Page locking host memory for code slices");
let now = Instant::now();
for db in [&left_codes, &right_codes] {
Expand Down

0 comments on commit 0f48603

Please sign in to comment.