Skip checking affinity before taking load-balance WaitScheduler path

The affinity mask may be set after the wait has began
This commit is contained in:
Billy Laws 2022-10-09 16:43:15 +01:00
parent ad3195e06f
commit 9784ae23e9

View File

@ -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