On the O3 CPU, when the number of threads on the CPU (SMT) is too low to
hold all the old style CPU workload items, then it would increase the
number of threads to match. There are three problems with this.
1. This behavior was only implemented on O3.
2. It could silently hide a bug in the config where the number of
workload items was accidentally too big.
3. It makes the DerivO3CPUParams struct tamper with itself in the
create() method, which means not even config.ini will accurately
reflect the actual config of the system.
Change-Id: I0aab70d4b98093f7f14156ca437e763f031049ab
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35937
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
fatal_if(FullSystem && params->numThreads > 1,
"SMT is not supported in O3 in full system mode currently.");
+ fatal_if(!FullSystem && params->numThreads < params->workload.size(),
+ "More workload items (%d) than threads (%d) on CPU %s.",
+ params->workload.size(), params->numThreads, name());
+
if (!params->switched_out) {
_status = Running;
} else {
DerivO3CPU *
DerivO3CPUParams::create()
{
- if (!FullSystem) {
- if (workload.size() > numThreads) {
- fatal("Workload Size (%i) > Max Supported Threads (%i) on This CPU",
- workload.size(), numThreads);
- } else if (workload.size() == 0) {
- fatal("Must specify at least one workload!");
- }
-
- // In non-full-system mode, we infer the number of threads from
- // the workload if it's not explicitly specified.
- numThreads =
- (numThreads >= workload.size()) ? numThreads : workload.size();
- }
-
return new DerivO3CPU(this);
}