Commit Graph

280 Commits

Author SHA1 Message Date
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
26909ffc19 Add base class for FAsyncTask to make it easier to interact with while keeping its templated type an implementation detail
#rnx
#rb Francis.Hurteau
#preflight 622f51ea344901ad1929b63f

[CL 19384075 by danny couture in ue5-main branch]
2022-03-15 07:50:05 -04:00
Devin Doucette
006e85ab44 CompressedBuffer: Changed RawHash to FIoHash
- Only the first 20 bytes of the RawHash field in the header will be consumed.
- In a subsequent change, the last 12 bytes of the RawHash field will be set to zero for new compressed buffers.

- Leveraged composite buffers to avoid performing an extra copy of compressed blocks.
- Updated FBlockEncoder::Compress to always use ParallelFor.
- Added ParallelForWithPreWorkWithTaskContext.

#preflight 622ba3869b7ce6ea5d44b7ab
#rb Zousar.Shaker
#rnx

[CL 19360767 by Devin Doucette in ue5-main branch]
2022-03-11 16:21:11 -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
junggun lim
73d255a75a Allow TAsyncResult<void> by disabling the const ref constructor for non-referenceable result types
#jira none
#rb Andriy.Tylychko
#preflight 6220c9b037049be5175c5c12

[CL 19260588 by junggun lim in ue5-main branch]
2022-03-03 21:20:46 -05:00
Andriy Tylychko
1433b7643c ParalleFor doesn't go wider than number of cores
#jira FORT-454706
#rb arne.schober, jordan.cristiano
#preflight 621f904d37049be51729b25f

[CL 19222139 by Andriy Tylychko in ue5-main branch]
2022-03-02 10:58:06 -05:00
steve robb
d25907098e FConcurrentLinearAllocator tags' TagNames changed to char to avoid problems with constexpr TCHARs in UTF-8 mode.
#rb arne.schober
#preflight 6217e0773a2dddac5aee5f37

#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 19123651 via CL 19123683 via CL 19123725 via CL 19125752
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19154482 by steve robb in ue5-main branch]
2022-02-25 15:17:28 -05:00
Arne Schober
fab7b5f06b U5 - Adding DebugName, MinNumBatchSize and LLM inheritance to ParallelFor
Also staring to remove some of the legacy TaskBackend Code to reduce the maintenence effort.
#preflight 6206a235c663666c89aa0e96

[CL 18955688 by Arne Schober in ue5-main branch]
2022-02-11 13:14:11 -05:00
andriy tylychko
b1a539ef31 REL - allow to not run the task continuation during cancellation, as it can be beneficial for some implementations to handle it with a manual Launch.
#ushell-cherrypick of 18452559 by arne.schober

#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18452544 via CL 18452545 via CL 18452554 via CL 18883856 via CL 18883880 via CL 18883884 via CL 18884166 via CL 18884239
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18884913 by andriy tylychko in ue5-main branch]
2022-02-07 09:14:58 -05:00
arne schober
265b427a72 FEM - introduce Parameters to TTaskDelegate in an effort to eventually reduce the size of FTask. This allows us to remove the this capture inside of FTask::Init. As an added benefit the nested Lambdas might also optimize better because of the much smaller body.
[FYI] Andriy.Tylychko, Francis.Hurteau, Mihnea.Balta

#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18764566 via CL 18764592 via CL 18764599 via CL 18765175 via CL 18765413
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18765421 by arne schober in ue5-main branch]
2022-01-27 18:53:56 -05:00
michael kirzinger
53c9b167aa Support for non-default constructable types in TPromise
[REVIEW] [at]Andriy.Tylychko
#jira OI-3642
#preflight 61f16f68e12e3fcf9b1baa70

#ROBOMERGE-AUTHOR: michael.kirzinger
#ROBOMERGE-SOURCE: CL 18736470 in //UE5/Release-5.0/... via CL 18736478 via CL 18736859
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18736874 by michael kirzinger in ue5-main branch]
2022-01-26 11:57:45 -05:00
arne schober
9b87ad16e4 FEM - remove unique pointer from parallel for for some small improvement of MVP
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18719672 via CL 18719675 via CL 18719677 via CL 18720056 via CL 18720138
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18720140 by arne schober in ue5-main branch]
2022-01-25 01:35:50 -05:00
arne schober
8909d9aac8 FEM - The Linear Allocator for oversized TaskDelegates (which we currently don't have any but that could enable more use cases for the future)
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18713882 via CL 18713934 via CL 18713942 via CL 18714811 via CL 18715173
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18716923 by arne schober in ue5-main branch]
2022-01-24 18:55:15 -05:00
arne schober
1aaa42445a FEM - missing static
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18706010 via CL 18706012 via CL 18706014 via CL 18706159 via CL 18706184 via CL 18706255
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18706278 by arne schober in ue5-main branch]
2022-01-24 02:44:53 -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
b65abb84db FEM - fixing a very small leak in the HazardRecordList and an unitizialized value in the WorkStealingQueue
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18701731 via CL 18701732 via CL 18701733 via CL 18702234 via CL 18702250 via CL 18702285
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18702289 by arne schober in ue5-main branch]
2022-01-22 14:45:38 -05:00
arne schober
cd159a7c7c FEM - harden some of the atomics to corellate with what x86 would do.
#preflight trivial

#ROBOMERGE-OWNER: arne.schober
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18686629 via CL 18686657 via CL 18686660 via CL 18688919 via CL 18688931 via CL 18688946
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18688977 by arne schober in ue5-main branch]
2022-01-21 09:32:35 -05:00
ben ingram
1baa13a629 Fix failing checkSlow
#rb arne.schober
#jira none
#preflight none

#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 18685418 in //UE5/Release-5.0/... via CL 18685431 via CL 18685439
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v902-18672795)

[CL 18685446 by ben ingram in ue5-main branch]
2022-01-20 21:10:20 -05:00
arne schober
c78e321986 FEM - upgrade parallelFor to use more a efficient LowLevel implementation.
#RB Ben.Woodhouse, Danny.Couture

#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18673424 via CL 18673479 via CL 18673484 via CL 18674320 via CL 18674401 via CL 18674465
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v902-18672795)

[CL 18679699 by arne schober in ue5-main branch]
2022-01-20 15:21:17 -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
96f14c8300 FEM - Fix memory oder of the Schedulers Sleep Stack
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 18622745 via CL 18622769 via CL 18622784 via CL 18623393 via CL 18623425 via CL 18623448
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18623467 by arne schober in ue5-main branch]
2022-01-14 16:23:24 -05:00
arne schober
f0c813df35 REL - Move the Inhert prioiry hint after Cout because Count is miss used to encode another meaning.
#preflight trivial

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

[CL 18561808 by arne schober in ue5-release-engine-test branch]
2022-01-10 12:43:49 -05:00
arne schober
b398f60285 REL - allow to pull all Init Parameters in bulk
#preflight trivial

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

[CL 18517662 by arne schober in ue5-release-engine-test branch]
2022-01-05 07:26:00 -05:00
arne schober
b157f26dcc REL - make AllowBusyWaiting() public
#preflight trivial

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

[CL 18517517 by arne schober in ue5-release-engine-test branch]
2022-01-05 06:47:27 -05:00