[PATCH v2 i-g-t 2/6] benchmarks/gem_wsim: Unify bond handling
Marcin Bernatowicz
marcin.bernatowicz at linux.intel.com
Tue Apr 23 08:56:42 UTC 2024
This change brings the handling of bonding information in line with
other parts of the code that use structured approaches for similar data,
enhancing overall consistency. Prepares code to use struct intel_engines as
bond.mask.
Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
---
benchmarks/gem_wsim.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
index e98624221..98e8fe55c 100644
--- a/benchmarks/gem_wsim.c
+++ b/benchmarks/gem_wsim.c
@@ -172,10 +172,7 @@ struct w_step {
int priority;
struct intel_engines engine_map;
bool load_balance;
- struct {
- uint64_t bond_mask;
- enum intel_engine_id bond_master;
- };
+ struct bond bond;
int sseu;
struct working_set working_set;
};
@@ -1146,8 +1143,8 @@ parse_workload(struct w_arg *arg, unsigned int flags, double scale_dur,
"Invalid context at step %u!\n",
nr_steps);
} else if (nr == 1) {
- step.bond_mask = engine_list_mask(field);
- check_arg(step.bond_mask == 0,
+ step.bond.mask = engine_list_mask(field);
+ check_arg(step.bond.mask == 0,
"Invalid siblings list at step %u!\n",
nr_steps);
} else if (nr == 2) {
@@ -1157,7 +1154,7 @@ parse_workload(struct w_arg *arg, unsigned int flags, double scale_dur,
tmp == DEFAULT,
"Invalid master engine at step %u!\n",
nr_steps);
- step.bond_master = tmp;
+ step.bond.master = tmp;
}
nr++;
@@ -2174,10 +2171,7 @@ static int prepare_contexts(unsigned int id, struct workload *wrk)
ctx->bond_count *
sizeof(struct bond));
igt_assert(ctx->bonds);
- ctx->bonds[ctx->bond_count - 1].mask =
- w->bond_mask;
- ctx->bonds[ctx->bond_count - 1].master =
- w->bond_master;
+ ctx->bonds[ctx->bond_count - 1] = w->bond;
}
}
}
--
2.31.1
More information about the igt-dev
mailing list