From: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: tvrtko.ursulin@linux.intel.com, kamil.konieczny@linux.intel.com,
lukasz.laguna@intel.com
Subject: [PATCH v2 i-g-t 2/6] benchmarks/gem_wsim: Unify bond handling
Date: Tue, 23 Apr 2024 10:56:42 +0200 [thread overview]
Message-ID: <20240423085646.6672-3-marcin.bernatowicz@linux.intel.com> (raw)
In-Reply-To: <20240423085646.6672-1-marcin.bernatowicz@linux.intel.com>
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@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
next prev parent reply other threads:[~2024-04-23 8:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 8:56 [PATCH v2 i-g-t 0/6] benchmarks/gem_wsim: Extend engine selection syntax Marcin Bernatowicz
2024-04-23 8:56 ` [PATCH v2 i-g-t 1/6] benchmarks/gem_wsim: Introduce intel_engines structure Marcin Bernatowicz
2024-07-23 11:01 ` Kamil Konieczny
2024-07-29 18:11 ` Bernatowicz, Marcin
2024-04-23 8:56 ` Marcin Bernatowicz [this message]
2024-04-23 8:56 ` [PATCH v2 i-g-t 3/6] benchmarks/gem_wsim: Introduce engine_idx to streamline engine selection Marcin Bernatowicz
2024-04-23 8:56 ` [PATCH v2 i-g-t 4/6] benchmarks/gem_wsim: Update request_idx in prepare phase Marcin Bernatowicz
2024-04-23 8:56 ` [PATCH v2 i-g-t 5/6] benchmarks/gem_wsim: Extend engine selection syntax Marcin Bernatowicz
2024-04-23 8:56 ` [PATCH v2 i-g-t 6/6] benchmarks/gem_wsim: Option to list physical engines Marcin Bernatowicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240423085646.6672-3-marcin.bernatowicz@linux.intel.com \
--to=marcin.bernatowicz@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=lukasz.laguna@intel.com \
--cc=tvrtko.ursulin@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox