Link graph: Clamp job duration multipliers to 1 for small jobs
Cost estimate < 4000
This commit is contained in:
@@ -73,7 +73,7 @@ void LinkGraphSchedule::SpawnNext()
|
|||||||
uint64 cost = lg->CalculateCostEstimate();
|
uint64 cost = lg->CalculateCostEstimate();
|
||||||
used_budget += cost;
|
used_budget += cost;
|
||||||
if (LinkGraphJob::CanAllocateItem()) {
|
if (LinkGraphJob::CanAllocateItem()) {
|
||||||
uint duration_multiplier = CeilDivT<uint64_t>(scaling * cost, total_cost);
|
uint duration_multiplier = cost < 4000 ? 1 : CeilDivT<uint64_t>(scaling * cost, total_cost);
|
||||||
std::unique_ptr<LinkGraphJob> job(new LinkGraphJob(*lg, duration_multiplier));
|
std::unique_ptr<LinkGraphJob> job(new LinkGraphJob(*lg, duration_multiplier));
|
||||||
jobs_to_execute.emplace_back(job.get(), cost);
|
jobs_to_execute.emplace_back(job.get(), cost);
|
||||||
if (this->running.empty() || job->JoinDateTicks() >= this->running.back()->JoinDateTicks()) {
|
if (this->running.empty() || job->JoinDateTicks() >= this->running.back()->JoinDateTicks()) {
|
||||||
|
Reference in New Issue
Block a user