Skip to content

Commit

Permalink
Remove special choas mode treatment of main thread
Browse files Browse the repository at this point in the history
  • Loading branch information
rocallahan committed Sep 20, 2024
1 parent 9476ad0 commit b21e46e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ bool Scheduler::in_high_priority_only_interval(double now) {
}

bool Scheduler::treat_as_high_priority(RecordTask* t) {
return task_priority_set_total_count > 1 && t->priority == 0;
return t->priority == 0;
}

void Scheduler::validate_scheduled_task() {
Expand Down Expand Up @@ -855,9 +855,6 @@ Scheduler::Rescheduled Scheduler::reschedule(Switchable switchable) {
}
}

// When there's only one thread, treat it as low priority for the
// purposes of high-priority-only-intervals. Otherwise single-threaded
// workloads mostly don't get any chaos mode effects.
if (next && !treat_as_high_priority(next) &&
last_reschedule_in_high_priority_only_interval) {
if (result.by_waitpid) {
Expand Down

0 comments on commit b21e46e

Please sign in to comment.