Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set numa memory affinity in run.py even for single core qemu instances #328

Merged
merged 4 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kernel/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def query_host_numa():
num_host_numa_nodes = len(host_numa_nodes_list)
if args.qemu_nodes and args.qemu_nodes > 0:
for node in range(0, args.qemu_nodes):
if args.qemu_cores > 1:
if args.qemu_cores > 0:
offset = args.qemu_node_offset if args.qemu_node_offset else 0
mem_per_node = args.qemu_memory / args.qemu_nodes
prealloc = "on" if args.qemu_prealloc else "off"
Expand Down
9 changes: 5 additions & 4 deletions kernel/tests/s10_benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,13 @@ fn s10_shootdown_simple() {
cmdline = cmdline.memory(48 * 1024);
}

if cfg!(feature = "smoke") && cores > 2 {
cmdline = cmdline.nodes(2);
let num_nodes = if cfg!(feature = "smoke") && cores > 2 {
core::cmp::min(cores, 2)
} else {
let max_numa_nodes = cmdline.machine.max_numa_nodes();
cmdline = cmdline.nodes(max_numa_nodes);
}
core::cmp::min(cores, max_numa_nodes)
};
cmdline = cmdline.nodes(num_nodes);

let mut output = String::new();
let mut qemu_run = || -> Result<WaitStatus> {
Expand Down
3 changes: 2 additions & 1 deletion kernel/tests/s11_rackscale_benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fn s11_rackscale_shmem_fxmark_benchmark() {
}

#[test]
#[ignore]
#[cfg(not(feature = "baremetal"))]
fn s11_rackscale_ethernet_fxmark_benchmark() {
rackscale_fxmark_benchmark(RackscaleTransport::Ethernet);
Expand Down Expand Up @@ -431,7 +432,7 @@ fn s11_rackscale_shmem_leveldb_benchmark() {
}

fn rackscale_timeout_fn(num_cores: usize) -> u64 {
180_000 + 500 * num_cores as u64
240_000 + 500 * num_cores as u64
}

fn mem_fn(num_cores: usize, is_smoke: bool) -> usize {
Expand Down