Commit Graph

206 Commits

Author SHA1 Message Date
Andriy Tylychko
573d2c69a4 fixed task retraction while waiting on named threads. check the new unit test for exact conditions
#rb francis.hurteau
#preflight 627d27784a05ef0394cc3970

[CL 20165251 by Andriy Tylychko in ue5-main branch]
2022-05-12 11:46:49 -04:00
Andriy Tylychko
e491fb8f8b tasks integration: Tasks System integrated into the old TaskGraph API as an intermediary step into transition to the new API. Disabled by default. The only remaining part of the old TaskGraph is named threads implementation that is not directly supported by the new Tasks System.
also includes the fix for parallel animation evaluation to work correctly with task retraction that is globally enabled by these change. animation fix was reviewed by evgenii.babinets

#rb francis.hurteau, danny.couture
#preflight 6268163bdd35c0d6cab2c267

[CL 19924083 by Andriy Tylychko in ue5-main branch]
2022-04-26 13:31:54 -04:00
David Harvey
0c99f08042 use non-inlined GetActiveTasks() in modular builds because ActiveTask can't be dllexport if it is also thread_local.
#rnx
#jira UE-149806
#preflight 6266da5c9337eeaec4fb67cd
#rb Nuno.Leiria

[CL 19918970 by David Harvey in ue5-main branch]
2022-04-26 09:14:06 -04:00
Arne Schober
3e0b418354 M - Symetric Task switching support for the Scheduler. This will allow Tasks to return an optional FTask* which is than used by the Scheduler to directly switch to and execute immediately regardless of it's priority.
#preflight 624e8d394e0a8b95d098807d

[CL 19673315 by Arne Schober in ue5-main branch]
2022-04-07 13:42:10 -04:00
Arne Schober
498b24891f M - C++ Coroutine Task implementation and support classes
#preflight 623bdeaa8900c14eecd8f1d6

[CL 19534082 by Arne Schober in ue5-main branch]
2022-03-28 17:45:21 -04:00
andrew ladenberger
d4242cdbf8 Removed a few high-frequency/low-value RHI stats to improve profiler readability and stability
#rb mickael.gilabert, andriy.tylychko
[FYI] ue-rendering-rhi

#ROBOMERGE-AUTHOR: andrew.ladenberger
#ROBOMERGE-SOURCE: CL 19375773 via CL 19375783 via CL 19377324 via CL 19392623 via CL 19393069
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19402299 by andrew ladenberger in ue5-main branch]
2022-03-16 03:04:16 -04:00
Arne Schober
3eb5affed9 M - LowLevel Task extension for Expediting, and Revival of previously cancelled Tasks.
Where Revival tries to revert any Cancellation as if it never happened. If the canceled Task was already executed by the Scheduler the revival will fail
(the Task will not be relaunched if revival fails). And where Expediting tries to fast track a task if the result is needed immediately on the current Context.
#preflight 6230cb60f41c515c3704cf08
#RB Francis.Hurteau

[CL 19388819 by Arne Schober in ue5-main branch]
2022-03-15 13:43:06 -04:00
danny couture
7a28251a42 Fix non-unity build
#rb trivial
#preflight 6228acd7d773d6497bfcd625

[CL 19319287 by danny couture in ue5-main branch]
2022-03-09 08:45:10 -05:00
danny couture
4114b4b372 Add support for dynamic thread prioritization
- This restore proper prioritization support that was lost with the new task backend while keeping a sane number of threads
  - This helps to prevent latency sensitive tasks from going to efficient cores for Alder Lake
  - This fixes performance problems caused by high prio task getting picked up by background threads and being preempted under high-load, causing FPS hiccups.
  - SetThreadPriority takes ~20us on average on Windows System and is only paid for background work
  - Longer SetThreadPriority can be expected when lowering the priority of a task under heavy load, which might cause the caller to be preempted right away, this is expected.
  - Can be A/B tested from command-line with -TaskGraphUseDynamicPrioritization=1/0

#rb Andriy.Tylychko, Arne.Schober, Stefan.Boberg
#preflight 622786a7e83598518f3745a1

[CL 19314282 by danny couture in ue5-main branch]
2022-03-08 19:24:40 -05:00
danny couture
48350e3e5f Add insights traces on pipe tasks for audio and stats
#rb Andriy.Tylychko
#preflight 621f6fe8e15c51d8c5fa66c8

[CL 19221338 by danny couture in ue5-main branch]
2022-03-02 09:32:54 -05:00
arne schober
152872a3ae FEM - Linux Desktop Platform is still inlining (DLL)EXPORT marked functions, therefor we prevent inlining on all Destop Platforms
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18705977 via CL 18705984 via CL 18705985 via CL 18706158 via CL 18706183 via CL 18706254
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18706276 by arne schober in ue5-main branch]
2022-01-24 02:44:43 -05:00
arne schober
0599bc1541 FEM - Move GetActiveTask as it is a Property of the Task.
#preflight trivial

#ROBOMERGE-OWNER: arne.schober
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18705843 via CL 18705878 via CL 18705880 via CL 18705980 via CL 18705982 via CL 18706248
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18706268 by arne schober in ue5-main branch]
2022-01-24 02:44:12 -05:00
arne schober
a261a4f55b FEM - Using the Concurrent Linear Allocator in multiple TaskGraph related systems to reduce Memory fragmentation, hitches and provide a slight performance boost.
#RB Ben.Woodhouse, Danny.Couture

#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18673418 via CL 18673478 via CL 18673481 via CL 18674312 via CL 18674344 via CL 18674390
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v902-18672795)

[CL 18679696 by arne schober in ue5-main branch]
2022-01-20 15:21:08 -05:00
arne schober
b0eabe8570 REL - Automatically Inherit Task Properties
#preflight 61ce97074c0560d4d0da3935

#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18498256 in //UE5/Release-5.0/... via CL 18498258
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18498259 by arne schober in ue5-release-engine-test branch]
2021-12-31 00:52:19 -05:00
catalin dragoiu
9b4d51dda0 Make the TaskId from TaskTrace 64 bit. Breaks compatibility with older traces containing Task events.
#jira UE-136060,UE-135668
#rb Andriy.Tylychko
#preflight 61af651c370808520303356a

#ROBOMERGE-AUTHOR: catalin.dragoiu
#ROBOMERGE-SOURCE: CL 18394965 in //UE5/Release-5.0/... via CL 18394982
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18394994 by catalin dragoiu in ue5-release-engine-test branch]
2021-12-07 10:07:15 -05:00
andriy tylychko
1fe69b04c3 cosmetic: replaced FThread constructor parameter bool bIsForkable by more explicit enum EForkable
#preflight 61ae305a0263140fa8a5c4cc

#ROBOMERGE-AUTHOR: andriy.tylychko
#ROBOMERGE-SOURCE: CL 18383183 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v896-18170469)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 18383202 by andriy tylychko in ue5-release-engine-test branch]
2021-12-06 11:23:40 -05:00
jeanfrancois dube
9a24033623 GC optimization: delay call to FMemory::Trim after unhashing is done instead of doing it right after the reachability pass, and also don't wait on memory trimming task thread to finish.
This has the side-effect of releasing unused OS pages to the next GC (since they are released from the per-thread calls to FlushCurrentThreadCache, but doesn't has a noticeable impact on internal demo.
In practice, this makes FMemory::Trim detached from the GC reachability pass, and takes ~4ms instead of ~10-50ms depending on the other threads workload.
Original code by PJ.Kack.

#rb kenzo.terelst, richard.malo
#lockdown jeff.farris
#preflight 61697646823b7b0001acfb3a

#ROBOMERGE-AUTHOR: jeanfrancois.dube
#ROBOMERGE-SOURCE: CL 17829574 via CL 18002912 via CL 18368846 via CL 18368871
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18368879 by jeanfrancois dube in ue5-release-engine-test branch]
2021-12-03 10:48:40 -05:00
andriy tylychko
f4d171806c TaskGraph: starting reserve workers regardless if GConfig is already initialized or not
#jira UE-135569

#ROBOMERGE-AUTHOR: andriy.tylychko
#ROBOMERGE-SOURCE: CL 18257764 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 18257778 by andriy tylychko in ue5-release-engine-test branch]
2021-11-22 09:16:44 -05:00
andriy tylychko
2f50e97a6a config option to disable reserve workers. reserve workers don't provide any perf improvement on consoles so are disabled by default
#rb francis.hurteau
#preflight 6194e42be05315f64f00b96c

#ROBOMERGE-AUTHOR: andriy.tylychko
#ROBOMERGE-SOURCE: CL 18221777 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 18221791 by andriy tylychko in ue5-release-engine-test branch]
2021-11-17 06:50:32 -05:00
andriy tylychko
587844fc00 TaskGraph: fixed WaitUntilTasksComplete to tolerate null tasks
#ROBOMERGE-AUTHOR: andriy.tylychko
#ROBOMERGE-SOURCE: CL 17816950 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17816965 by andriy tylychko in ue5-release-engine-test branch]
2021-10-14 11:40:03 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
andriy tylychko
d44e571545 fixed reserve workers stalling on exit
[FYI] arne.schober

#ROBOMERGE-AUTHOR: andriy.tylychko
#ROBOMERGE-SOURCE: CL 17628182 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17628190 by andriy tylychko in ue5-release-engine-test branch]
2021-09-27 04:46:56 -04:00
devin doucette
b06c7a60f1 Experimental UE::FLazyEvent that allocates an event only when necessary
#rb Andriy.Tylychko
#preflight 6148ec33286e3b0001f0f2b9

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 17608991 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17608999 by devin doucette in ue5-release-engine-test branch]
2021-09-23 11:48:38 -04:00
arne schober
398721f211 U5 - adding extra verfication constraints.
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 17543261 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17543280 by arne schober in ue5-release-engine-test branch]
2021-09-16 15:26:30 -04:00
arne schober
db71e3f7cb U5 - fix cases of early drowsing state.
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 17542302 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17542308 by arne schober in ue5-release-engine-test branch]
2021-09-16 14:26:58 -04:00