From 9784ae23e9ac6e351aeafac07b7461b081f198e1 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sun, 9 Oct 2022 16:43:15 +0100 Subject: [PATCH] Skip checking affinity before taking load-balance WaitScheduler path The affinity mask may be set after the wait has began --- app/src/main/cpp/skyline/kernel/scheduler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/kernel/scheduler.cpp b/app/src/main/cpp/skyline/kernel/scheduler.cpp index 8107e4ad..41eb3290 100644 --- a/app/src/main/cpp/skyline/kernel/scheduler.cpp +++ b/app/src/main/cpp/skyline/kernel/scheduler.cpp @@ -167,7 +167,7 @@ namespace skyline::kernel { }}; TRACE_EVENT("scheduler", "WaitSchedule"); - if (loadBalance && thread->affinityMask.count() > 1) { + if (loadBalance) { std::chrono::milliseconds loadBalanceThreshold{PreemptiveTimeslice * 2}; //!< The amount of time that needs to pass unscheduled for a thread to attempt load balancing while (!thread->scheduleCondition.wait_for(lock, loadBalanceThreshold, wakeFunction)) { lock.unlock(); // We cannot call GetOptimalCoreForThread without relinquishing the core mutex