cpu: Remove automatic overriding of numThreads in SE on O3.

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>
This commit is contained in:
Gabe Black
2020-10-11 17:26:10 -07:00
parent 05e60080dc
commit 2ae079c6be
2 changed files with 4 additions and 14 deletions

View File

@@ -132,6 +132,10 @@ FullO3CPU<Impl>::FullO3CPU(DerivO3CPUParams *params)
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 {

View File

@@ -35,19 +35,5 @@
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);
}