From b21e46e3447bb113a27152ecce16841d920cf2d7 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Thu, 19 Sep 2024 23:53:59 +0200 Subject: [PATCH] Remove special choas mode treatment of main thread --- src/Scheduler.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Scheduler.cc b/src/Scheduler.cc index 15498337a09..5fcadeae158 100644 --- a/src/Scheduler.cc +++ b/src/Scheduler.cc @@ -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() { @@ -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) {