- Fix DoNotRunInsideBusyWait tasks that ended up being picked up during busy waiting anyway.
- Change internal API of ExecuteTask to make it evident it can actually return a new task.
- Make sure that busy wait will dequeue tasks from local/global queue in priority order.
- Remove unused local queue functions.
#jira UE-199870
#rb JeanFrancois.Dube
[CL 29908002 by danny couture in ue5-main branch]
- Fix deadlock and indeterminism caused by not always signaling a thread after launching a task
- Fix deadlock that happened when trying to launch blocking tasks on all workers
- Use a PreWait/CancelWait/CommitWait semantic to close the gap where a drowsing thread could pick a task without the signaling thread knowing about it.
- Deprecate TryLaunchAffinity workaround now that the deadlocks above have been fixed
- Get rid of task stealing throttling as stealing to reduce latency as it is only involved when searching work before going to sleep
- Less spurious wake-ups as a worker will only wake-up another one when picking up a task if CancelWait has consumed a signal
- Workers will now honor task priorities between local and global queues
- Add blocked workers benchmark test
#jira UE-199959
#rb JeanFrancois.Dube
#tests TSAN / UnitTests / StressTests / ReplayRuns
[CL 29744016 by danny couture in ue5-main branch]
- Add UE::FTwoBitMutex which takes a pointer to an external-state of which it only uses its two LSBs.
- Adds tests for FMutex and FExternalMutex
#rb devin.doucette
#rb yiliang.siew
[CL 29024883 by jared cotton in ue5-main branch]
FCpuProfilerTrace::OutputEventType() and FCpuProfilerTrace::OutputBeginDynamicEvent() needs to be called only if the CpuChannel is enabled, otherwise the "spec" trace event is not emitted, so it will result in "<unknown>" cpu timers. The issue can be easily reproduced with -trace=tasks (i.e. without enabling cpu channel).
#jira UE-196134
#rb Andriy.Tylychko
[CL 28185939 by ionut matasaru in ue5-main branch]
This is a rather "hacky" fix. The old task implementation (TaskGraph API) is on a life support so there's no point of spending too much time for this
#preflight 644be99f1c2846595c45a4f2
#rb danny.couture
[CL 25235003 by Andriy Tylychko in ue5-main branch]
ParkingLot cannot be used to synchronize allocator implementations if ParkingLot itself depends on those allocators.
#preflight 6441575673470c177c178ce2
#rb Zousar.Shaker
#rnx
[CL 25131053 by devin doucette in ue5-main branch]
Avoiding duplicate conditions, restructuring loops, and using LIKELY/UNLIKELY allows the compiler to generate shorter and faster code.
#rb Zousar.Shaker
#rnx
[CL 24995086 by devin doucette in ue5-main branch]
The experimental UE::FLazyEvent has been superceded by UE::FManualResetEvent and UE::FEventCount.
#preflight 6434218041783dc3d0706df5
#rb none
#rnx
[CL 24978662 by devin doucette in ue5-main branch]
ParkingLot cannot be used to synchronize allocator implementations if ParkingLot itself depends on those allocators.
#rb Zousar.Shaker
#rnx
[CL 24977705 by devin doucette in ue5-main branch]
This is an 8-byte unfair recursive mutex built on top of ParkingLot.
Provides the same API as FCriticalSection which allows it to be used as a drop-in replacement.
#preflight 6422fde4803cb466e85619b0
#rb Andriy.Tylychko, Phil.Pizlo
[CL 24873014 by devin doucette in ue5-main branch]