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

Hwdb adjustments #286

Merged
merged 2 commits into from
Sep 7, 2022
Merged
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
18 changes: 15 additions & 3 deletions resctl-bench/src/bench/iocost_tune.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2333,7 +2333,7 @@ impl IoCostTuneJob {
writeln!(out, "block:*:name:{}:", sysrep.scr_dev_model).unwrap();

// Merge files may be missing some solutions, so try defaults in order.
let available_solutions: Vec<(&str, &QoSSolution)> = (*DEFAULT_HWDB_MODELS)
let mut available_solutions: Vec<(&str, &QoSSolution)> = (*DEFAULT_HWDB_MODELS)
.iter()
.map(|name| {
res.solutions
Expand All @@ -2354,11 +2354,23 @@ impl IoCostTuneJob {
)
.unwrap();

// Now add the rlat solutions, they should not be present in the list of defaults
// but should be included in the file.
for (name, solution) in res.solutions.iter() {
if !name.starts_with("rlat") {
continue;
}

available_solutions.push((name, solution));
}

for solution in available_solutions {
let normalized_name = solution.0.to_uppercase().replace("-", "_");

writeln!(
out,
"\n IOCOST_MODEL_{}=rbps={} rseqiops={} rrandiops={} wbps={} wseqiops={} wrandiops={}",
solution.0.to_uppercase(),
normalized_name,
solution.1.model.rbps,
solution.1.model.rseqiops,
solution.1.model.rrandiops,
Expand All @@ -2372,7 +2384,7 @@ impl IoCostTuneJob {
write!(
out,
" IOCOST_QOS_{}=rpct={:.2} rlat={} wpct={:.2} wlat={} min={:.2} max={:.2}",
solution.0.to_uppercase(),
normalized_name,
solution.1.qos.rpct,
solution.1.qos.rlat,
solution.1.qos.wpct,
Expand Down