From 1a56277702ea666b2efd2ad3e8081b2ed1e7542e Mon Sep 17 00:00:00 2001 From: Gerd Zellweger Date: Sun, 19 Nov 2023 23:52:47 -0800 Subject: [PATCH] A workign configuration. Signed-off-by: Gerd Zellweger --- kernel/Cargo.toml | 2 ++ kernel/src/arch/x86_64/irq.rs | 3 ++- kernel/tests/s11_rackscale_benchmarks.rs | 7 +++++-- usr/rkapps/build.rs | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index 7656474c..ff2b39ee 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -103,6 +103,8 @@ rackscale = ["rpc"] gdb = [] # Use to enable 4kiB only in kernel - useful for memcached, similar benchmarks pages-4k = [] +# dynrep benchmarking +dynrep = [] # # The following features are used for testing *only* and should not be enabled diff --git a/kernel/src/arch/x86_64/irq.rs b/kernel/src/arch/x86_64/irq.rs index dade8072..ae633e5c 100644 --- a/kernel/src/arch/x86_64/irq.rs +++ b/kernel/src/arch/x86_64/irq.rs @@ -528,7 +528,8 @@ unsafe fn timer_handler(_a: &ExceptionArguments) { nrproc::NrProcess::::synchronize(pid); } - if *crate::environment::MT_ID == 0 { + #[cfg(feature = "dynrep")] + if *crate::environment::MT_ID == 4 { use crate::arch::process::current_pid; let pid = current_pid().expect("dont have a pid?"); diff --git a/kernel/tests/s11_rackscale_benchmarks.rs b/kernel/tests/s11_rackscale_benchmarks.rs index af3efe05..1b71101a 100644 --- a/kernel/tests/s11_rackscale_benchmarks.rs +++ b/kernel/tests/s11_rackscale_benchmarks.rs @@ -671,6 +671,7 @@ fn s11_rackscale_memcached_dynrep_benchmark_internal() { .user_feature("rkapps:memcached-bench") .set_rackscale(true) .kernel_feature("pages-4k") + .kernel_feature("dynrep") .release() .build(); @@ -776,17 +777,19 @@ fn s11_rackscale_memcached_dynrep_benchmark_internal() { let r = csv_file.write("\n".as_bytes()); assert!(r.is_ok()); + println!("> {}", output); + Ok(()) } let config = if is_smoke { MemcachedInternalConfig { - num_queries: 100_000, + num_queries: 100_000_000, mem_size: 16, } } else { MemcachedInternalConfig { - num_queries: 1_000_000, // TODO(rackscale): should be 100_000_000, + num_queries: 100_000_000, // TODO(rackscale): should be 100_000_000, mem_size: 16, // TODO(rackscale): should be 32_000, } }; diff --git a/usr/rkapps/build.rs b/usr/rkapps/build.rs index 534bbdd8..064c22d3 100644 --- a/usr/rkapps/build.rs +++ b/usr/rkapps/build.rs @@ -138,11 +138,11 @@ fn main() { .unwrap(); println!( - "CHECKOUT be303d8bfc2c40d63704848bb3acd9e075dd61e4 {:?}", + "CHECKOUT 1f36e49a3c5fc529cd80278a1bd73b9941c813e6 {:?}", out_dir ); Command::new("git") - .args(&["checkout", "be303d8bfc2c40d63704848bb3acd9e075dd61e4"]) + .args(&["checkout", "1f36e49a3c5fc529cd80278a1bd73b9941c813e6"]) .current_dir(&Path::new(&out_dir)) .status() .unwrap();