[*] Tweak default thread config

This commit is contained in:
Reece Wilson 2023-08-27 21:27:49 +01:00
parent 97296d1fe9
commit 209d1939aa
2 changed files with 7 additions and 5 deletions

View File

@ -346,7 +346,7 @@ namespace Aurora
bool bNoThreadNames { false };
bool bPlatformIsSMPProcessorOptimized { true }; // Whether to attempt to using mm_pause or similar before yielding into the kernel
AuUInt8 uSpinLoopPowerA { 40 }; // Nudgable spinloop power. This is our local userland niceness factor
AuUInt8 uSpinLoopPowerA { 80 }; // Nudgable spinloop power. This is our local userland niceness factor
// This is comparable to Win32's SetCriticalSectionSpinCount applied across every single AuThreadPrimitives try-lock and lock.
// Adjust this value to compensate for longer critical sections when context switching isn't preferrable.
AuUInt8 uSpinLoopLinearBit { 1 };
@ -366,15 +366,15 @@ namespace Aurora
AuUInt64 bPreferWaitOnAddressAlwaysSpin : 1 { true }; // ..., if emulated! if double-spinning under higher level locks, disable me.
AuUInt64 bPreferRWLockReadLockSpin : 1 { true };
AuUInt64 bUWPNanosecondEmulationCheckFirst : 1 { false };
AuUInt64 uUWPNanosecondEmulationMaxYields : 7 { 12 };
AuUInt64 bForceEnableAdaptiveSpin : 1 { false };
AuUInt64 bPreferEnableAdaptiveSpin : 1 { true };
AuUInt64 uUWPNanosecondEmulationMaxYields : 7 { 12 };
AuUInt64 bPreferLinuxAdaptiveSpin : 1 { true };
AuUInt64 bPreferOldWin32AdaptiveSpin : 1 { true };
AuUInt64 bPreferOldWin32AdaptiveSpin : 1 { false };
AuUInt64 bPreferNewWin32AdaptiveSpin : 1 { true };
AuUInt64 uAdaptiveSpinCUCnt0 : 4 { 0 };
AuUInt64 uAdaptiveSpinCUCnt4 : 4 { 2 };
AuUInt64 uAdaptiveSpinCUCnt8 : 4 { 3 };
AuUInt64 uAdaptiveSpinCUCnt8 : 4 { 2 };
AuUInt64 uAdaptiveSpinCUCnt16 : 4 { 4 };
AuUInt64 bPreferFutexRWLock : 1 { true };
AuUInt64 bWinXpThrough7BlazeOptimizerPower : 7 { 6 }; // dont worry about it. we dont care about old portables. lets try to make older win32 targets tweak the scheduling in our favor a bit.

View File

@ -151,7 +151,9 @@ namespace Aurora::Async
}
else
{
AU_LOCK_GUARD(pWorker->cvWorkMutex);
{
AU_LOCK_GUARD(pWorker->cvWorkMutex);
}
pWorker->cvVariable->Signal();
pWorker->eventLs->Set();