Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

Commit a8b9c1f

Browse files
committed
Add comments about memory size; fix bug in controller readiness check
1 parent d6306a0 commit a8b9c1f

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

kernel/src/arch/x86_64/rackscale/controller.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,11 @@ pub(crate) fn run() {
6464
unreachable!("No supported transport layer specified in kernel argument");
6565
};
6666

67+
ClientReadyCount.fetch_add(1, Ordering::SeqCst);
68+
6769
// Wait for all clients to connect before fulfilling any RPCs.
6870
while !DCMServerReady.load(Ordering::SeqCst) {}
6971

70-
// Don't modify this line without modifying testutils/rackscale_runner.rs
71-
log::warn!("CONTROLLER READY");
72-
7372
server
7473
.add_client(&CLIENT_REGISTRAR)
7574
.expect("Failed to accept client");
@@ -136,6 +135,15 @@ pub(crate) fn poll_interface() {
136135
let _ = server.add_client(&DCM_CLIENT_REGISTRAR).unwrap();
137136
log::info!("Added DCM server RPC client!");
138137

138+
// Wait for all clients to initialize before signaling the all-clear
139+
while ClientReadyCount.load(Ordering::SeqCst) != (*crate::environment::NUM_MACHINES - 1) as u64
140+
{
141+
}
142+
ClientReadyCount.store(0, Ordering::SeqCst);
143+
144+
// Don't modify this line without modifying testutils/rackscale_runner.rs
145+
log::warn!("CONTROLLER READY");
146+
139147
// Now that server is ready, the clients may be accepted.
140148
DCMServerReady.store(true, Ordering::SeqCst);
141149

kernel/tests/s11_rackscale_benchmarks.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ fn s11_rackscale_shmem_fxmark_benchmark() {
2626
}
2727

2828
#[test]
29-
#[ignore]
3029
#[cfg(not(feature = "baremetal"))]
3130
fn s11_rackscale_ethernet_fxmark_benchmark() {
3231
rackscale_fxmark_benchmark(RackscaleTransport::Ethernet);
@@ -137,6 +136,7 @@ fn rackscale_fxmark_benchmark(transport: RackscaleTransport) {
137136
if is_smoke {
138137
8192
139138
} else {
139+
// Memory must also be divisible by number of nodes, which could be 1, 2, 3, or 4
140140
2048 * (((num_cores + 3 - 1) / 3) * 3)
141141
}
142142
}
@@ -438,6 +438,7 @@ fn s11_rackscale_shmem_leveldb_benchmark() {
438438
if is_smoke {
439439
8192
440440
} else {
441+
// Memory must also be divisible by number of nodes, which could be 1, 2, 3, or 4
441442
2048 * (((((num_cores + 1) / 2) + 3 - 1) / 3) * 3)
442443
}
443444
}
@@ -632,6 +633,7 @@ fn rackscale_memcached_benchmark(transport: RackscaleTransport) {
632633
if is_smoke {
633634
8192
634635
} else {
636+
// Memory must also be divisible by number of nodes, which could be 1, 2, 3, or 4
635637
2048 * (((((num_cores + 1) / 2) + 3 - 1) / 3) * 3)
636638
}
637639
}
@@ -715,6 +717,7 @@ fn rackscale_monetdb_benchmark(transport: RackscaleTransport) {
715717
if is_smoke {
716718
8192
717719
} else {
720+
// Memory must also be divisible by number of nodes, which could be 1, 2, 3, or 4
718721
2048 * (((((num_cores + 1) / 2) + 3 - 1) / 3) * 3)
719722
}
720723
}

kernel/testutils/src/rackscale_runner.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,12 @@ impl<T: Clone + Send + 'static> RackscaleBench<T> {
539539
let cores_per_client = total_cores / num_clients;
540540

541541
// Break if not enough total cores for the controller, or if we would have to split controller across nodes to make it fit
542-
if !is_baseline
543-
&& ((total_cores + num_clients + 1 > machine.max_cores())
544-
|| (num_clients == machine.max_numa_nodes()
545-
&& cores_per_client + num_clients + 1 > total_cores_per_node))
542+
// We want controller to have it's own socket, so if it's not a 1 socket machine, break when there's equal number of clients
543+
// to numa nodes.
544+
if total_cores + num_clients + 1 > machine.max_cores()
545+
|| num_clients == machine.max_numa_nodes()
546+
&& cores_per_client + num_clients + 1 > total_cores_per_node
547+
|| num_clients == max_numa && max_numa > 1
546548
{
547549
break;
548550
}

0 commit comments

Comments
 (0)