perf(libkernel): pin guest threads to the efficiency cores on request #12544

Open
XairRrR wants to merge 1 commit from upstream-pr/12544 into main
XairRrR commented 2026-10-28 19:02:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-28T19:02:33Z.


What

On a hybrid CPU the queue workers and the presenter run on the performance cores by default on Linux (#626). Guest threads have no host affinity: the affinity a title sets is kept for its getters but never applied to the host thread. A title whose job workers spin at full load on every core they own therefore puts those spinners on the same performance cores, often on the second hardware thread of a core a queue worker runs on.

APS5_GUEST_AFFINITY=1 now pins every guest thread to the efficiency cores of a hybrid CPU when it starts, on Linux and Windows. APS5_GUEST_AFFINITY_MASK=<hex> picks the cores instead. Both are off by default, like APS5_JOB_AFFINITY. That variable selects threads by one title's job worker name and is Windows only; the new one does not look at thread names.

Tested

Arch Linux 7.2.11-zen, GCC 16.2.1, Ninja, Release, on main 3a2b919816, Intel Core i9-14900KF (8 performance cores with 2 threads each, 16 efficiency cores):

  • New guest_thread_host_affinity (Linux): sets APS5_GUEST_AFFINITY_MASK to one core of the process and checks that two guest threads run on exactly that core, and that the creating thread keeps its mask. With Thread.cpp from main it fails: a guest thread does not run on the cores APS5_GUEST_AFFINITY_MASK names.

  • Full ctest -j8 on the first base (main 3b362ba2e0): all 2741 tests pass (60 skipped). Rebased on 3a2b919816: guest_thread_host_affinity and the guest_pthread* tests pass (56/56).

  • tools/check_conventions.py --base origin/main passes.

  • PPSA05684 (Uncharted: Legacy of Thieves Collection): its 13 job workers (NdJobWorkerThread 0..12) spin with pause at 100 % each. With APS5_GUEST_AFFINITY=1 they run on the efficiency cores.

    The captures below follow the Performance report form. They come from clean builds of main 3a2b919816 and of this branch, fda3f6ca6c ("dirty": false in both), captured on the same machine in the same session, with warm caches. Both capture the Uncharted 4 prison yard fight, reached through the developer menu by the same scripted inputs, with APS5_TRACE_SECONDS=195:8 and no other APS5_TRACE_* or APS5_PROFILE_* switch. The environments differ only in APS5_GUEST_AFFINITY. The APS5_LOCAL_* names come from my launch script and do not exist on main.

    The 8 s window keeps queue 0 inside its default event buffer, so neither trace drops events. The launch script writes the log to a file in both runs; the logger reports 0.2 to 4.4 KiB per 10 s there.

    main 3a2b919816 This branch with APS5_GUEST_AFFINITY=1
    Presents in 8 s 28 32
    Frame p50 / p90 / p99 282.4 / 308.3 / 359.7 ms 250.1 / 278.1 / 302.5 ms
    GPU busy per present 104.7 ms 93.9 ms
    queue worker 0x0 busy 140.2 ms per frame 127.3 ms per frame
    Dropped trace events none none

    Clean main does not reach this scene every time. Over 7 attempts in this session on the two builds, 5 ended early:

    • 3 times, a sampled view of 2.5 to 40 GiB (2560x1440 or 1280x720 arrays with hundreds of slices, in no guest allocation) ran out of memory, killed by my memory watchdog or as std::bad_alloc.
    • Once, vkWaitForFences returned VK_ERROR_DEVICE_LOST.
    • Once, my memory watchdog killed the run without a view in the log.

    The oversized views and the device loss do not happen on the local stack.

    The captures are from the runs that reached the fight.

    Traces: main, this branch

    Summary line, main:

    {"commit":"3a2b91981651","dirty":false,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"195:8"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted™: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 195:8","first_present":2410,"ms":8012.792},"presents":28,"frame_ms":{"p50":282.420,"p90":308.327,"p99":359.737,"max":359.737},"gpu_busy_ms_per_present":104.734,"worker_busy_pct":{"queue worker 0x0":72.598,"queue worker 0x43":77.285,"queue worker 0x21":12.541,"queue worker 0x50":0.192,"queue worker 0x52":0.244,"queue worker 0x29":20.896,"queue worker 0x56":96.338,"queue worker 0x31":36.244,"queue worker 0x39":45.045,"queue worker 0x49":19.195,"queue worker 0x41":35.466},"top_phases_ms_per_frame":{"Driver.Packet":1186.075,"Driver.Packet.memory_wait":758.571,"Driver.Packet.dispatch":276.247,"Driver.Dispatch":244.039,"Driver.Packet.draw":118.164,"Driver.Draw":117.662,"Graphics.Draw":96.348,"Graphics.Draw.draw_and_resource_release":92.135},"trace_dropped":false,"trace":"aps5-trace-3a2b91981651-1495087.json.gz"}
    

    Summary line, this branch:

    {"commit":"fda3f6ca6c0c","dirty":false,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_GUEST_AFFINITY":"1","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"195:8"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted™: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 195:8","first_present":2503,"ms":8103.759},"presents":32,"frame_ms":{"p50":250.076,"p90":278.090,"p99":302.491,"max":302.491},"gpu_busy_ms_per_present":93.863,"worker_busy_pct":{"queue worker 0x0":73.316,"queue worker 0x43":77.340,"queue worker 0x21":10.509,"queue worker 0x52":0.250,"queue worker 0x50":0.187,"queue worker 0x29":9.595,"queue worker 0x56":96.463,"queue worker 0x49":35.609,"queue worker 0x41":32.881,"queue worker 0x31":14.157,"queue worker 0x39":43.454},"top_phases_ms_per_frame":{"Driver.Packet":993.112,"Driver.Packet.memory_wait":620.976,"Driver.Packet.dispatch":235.123,"Driver.Dispatch":205.303,"Driver.Packet.draw":107.265,"Driver.Draw":106.820,"Graphics.Draw":86.683,"Graphics.Draw.draw_and_resource_release":82.868},"trace_dropped":false,"trace":"aps5-trace-fda3f6ca6c0c-1527350.json.gz"}
    
    tools/trace_digest.py, main

seconds 195:8 from present 2410: 28 presents, frame p50 282.4 / p90 308.3 / p99 359.7 / max 359.7 ms, GPU busy 104.7 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit 3a2b919816, dropped: no

{"commit":"3a2b91981651","dirty":false,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"195:8"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted\u2122: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 195:8","first_present":2410,"ms":8012.792},"presents":28,"frame_ms":{"p50":282.42,"p90":308.327,"p99":359.737,"max":359.737},"gpu_busy_ms_per_present":104.734,"worker_busy_pct":{"queue worker 0x0":72.598,"queue worker 0x43":77.285,"queue worker 0x21":12.541,"queue worker 0x50":0.192,"queue worker 0x52":0.244,"queue worker 0x29":20.896,"queue worker 0x56":96.338,"queue worker 0x31":36.244,"queue worker 0x39":45.045,"queue worker 0x49":19.195,"queue worker 0x41":35.466},"top_phases_ms_per_frame":{"Driver.Packet":1186.075,"Driver.Packet.memory_wait":758.571,"Driver.Packet.dispatch":276.247,"Driver.Dispatch":244.039,"Driver.Packet.draw":118.164,"Driver.Draw":117.662,"Graphics.Draw":96.348,"Graphics.Draw.draw_and_resource_release":92.135},"trace_dropped":false,"trace":"aps5-trace-3a2b91981651-1495087.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2412: 359.7 ms at 561 ms: Driver.Packet (queue worker 0x56) 359.5, Driver.WorkerWait (queue worker 0x52) 359.2, Driver.WorkerWait (queue worker 0x50) 358.7, Driver.Packet.memory_wait (queue worker 0x56) 357.5
  • present 2431: 342.6 ms at 5988 ms: Driver.WorkerWait (queue worker 0x52) 342.6, Driver.Packet (queue worker 0x56) 342.4, Driver.Packet (queue worker 0x31) 342.0, Driver.WorkerWait (queue worker 0x50) 341.9
  • present 2417: 308.3 ms at 2009 ms: Driver.Packet (queue worker 0x56) 308.2, Driver.WorkerWait (queue worker 0x52) 307.7, Driver.WorkerWait (queue worker 0x50) 307.6, Driver.Packet (queue worker 0x39) 307.4
  • present 2426: 305.1 ms at 4539 ms: Driver.Packet (queue worker 0x56) 304.9, Driver.WorkerWait (queue worker 0x52) 304.6, Driver.WorkerWait (queue worker 0x50) 304.5, Driver.Packet (queue worker 0x41) 304.4
  • present 2432: 300.0 ms at 6330 ms: Driver.Packet (queue worker 0x56) 299.8, Driver.WorkerWait (queue worker 0x52) 299.3, Driver.Packet (queue worker 0x39) 299.2, Driver.WorkerWait (queue worker 0x50) 298.5

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.0 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
queue worker 0x0 140.2 (49 %) 114.5 (40 %) 31.4 158.5 Driver.Packet 179.0, Driver.Rewind 0.3
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
draw committer 45.4 (16 %) 0.7 (0 %) 240.1 25.8 Graphics.Draw 35.0, Recorder.Sync 9.6
presenter 0.7 (0 %) 0.5 (0 %) 284.9 0.1 VideoOut.Flip 1.1, Driver.Present 0.2
queue worker 0x43 79.8 (28 %) 203.3 (71 %) 3.1 3.3 Driver.Packet 220.0, Driver.EndSubmission 0.3
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
queue worker 0x21 14.7 (5 %) 268.9 (94 %) 2.5 6.2 Driver.Packet 35.0, Driver.EndSubmission 0.5
queue worker 0x50 0.4 (0 %) 275.9 (96 %) 9.9 0.2 Driver.Packet 0.4, Driver.EndSubmission 0.0
queue worker 0x52 0.4 (0 %) 275.9 (96 %) 9.9 0.2 Driver.Packet 0.6
queue worker 0x29 15.0 (5 %) 261.2 (91 %) 10.0 6.2 Driver.Packet 58.9, Driver.EndSubmission 0.5
queue worker 0x56 1.2 (0 %) 274.3 (96 %) 10.6 0.9 Driver.Packet 275.5, Driver.EndSubmission 0.0
queue worker 0x31 15.2 (5 %) 261.3 (91 %) 9.7 6.1 Driver.Packet 102.5, Driver.EndSubmission 0.8
queue worker 0x39 14.7 (5 %) 262.2 (92 %) 9.3 6.1 Driver.Packet 127.9, Driver.EndSubmission 0.7
queue worker 0x49 11.2 (4 %) 265.5 (93 %) 9.5 4.4 Driver.Packet 54.1, Driver.EndSubmission 0.5
queue worker 0x41 14.4 (5 %) 269.3 (94 %) 2.5 6.0 Driver.Packet 100.6, Driver.EndSubmission 0.5
gpu 104.5 (37 %) 0.0 (0 %) 181.7 0.0 batch 104.5

Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 1880.2, Driver.WorkerWait.dequeue_order 1848.5, Driver.Packet 1154.7, Driver.Packet.memory_wait 758.2, Driver.Packet.dispatch 274.9, Driver.Dispatch 237.3, batch 104.5, Driver.Packet.draw 102.6, Driver.Draw 102.3, Graphics.Draw 84.3

Longest waits

  • Driver.WorkerWait (queue worker 0x52) 396.9 ms at 5933 ms, present 2430
  • Driver.WorkerWait (queue worker 0x52) 359.3 ms at 561 ms, present 2412
  • Driver.Packet.memory_wait (queue worker 0x56) 355.7 ms at 363 ms, present 2411
  • Driver.WorkerWait (queue worker 0x50) 341.9 ms at 5988 ms, present 2431
  • Driver.WorkerWait (queue worker 0x49) 334.7 ms at 586 ms, present 2412
  • Driver.Packet.memory_wait (queue worker 0x56) 330.8 ms at 6073 ms, present 2431
  • Driver.WorkerWait (queue worker 0x50) 330.5 ms at 874 ms, present 2412
  • Driver.WorkerWait (queue worker 0x50) 325.4 ms at 1429 ms, present 2414
  • Driver.WorkerWait (queue worker 0x29) 322.7 ms at 598 ms, present 2412
  • Driver.Packet.memory_wait (queue worker 0x41) 317.4 ms at 6026 ms, present 2431

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 662: 6.4 ms at 1521 ms, present 2415: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x0) 29.6, Driver.WorkerWait.dequeue_order (queue worker 0x0) 29.6, Driver.Packet (queue worker 0x0) 2.6, Driver.Packet.pipeline_drain (queue worker 0x0) 1.3

  • batch 358: 6.1 ms at 863 ms, present 2412: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.4, Driver.Packet.draw (queue worker 0x0) 6.4, Driver.Draw (queue worker 0x0) 6.4, Driver.Draw.shader_compile_and_link (queue worker 0x0) 3.4

  • batch 2184: 6.1 ms at 4894 ms, present 2427: GPU no ranges; recorded by Recorder.Submit (draw committer) 2.0, Recorder.Reap (draw committer) 0.1, Graphics.Draw (draw committer) 0.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.0

  • batch 3183: 6.0 ms at 7212 ms, present 2435: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x0) 44.8, Driver.WorkerWait.dequeue_order (queue worker 0x0) 44.8, Driver.Packet (queue worker 0x0) 2.9, Driver.Packet.draw (queue worker 0x0) 1.2

  • batch 2435: 6.0 ms at 5445 ms, present 2429: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x0) 46.0, Driver.WorkerWait.dequeue_order (queue worker 0x0) 46.0, Driver.Packet (queue worker 0x0) 1.9, Driver.Packet.pipeline_drain (queue worker 0x0) 0.8

    tools/trace_digest.py, this branch

seconds 195:8 from present 2503: 32 presents, frame p50 250.1 / p90 278.1 / p99 302.5 / max 302.5 ms, GPU busy 93.9 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit fda3f6ca6c0c, dropped: no

{"commit":"fda3f6ca6c0c","dirty":false,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_GUEST_AFFINITY":"1","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"195:8"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted\u2122: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 195:8","first_present":2503,"ms":8103.759},"presents":32,"frame_ms":{"p50":250.076,"p90":278.09,"p99":302.491,"max":302.491},"gpu_busy_ms_per_present":93.863,"worker_busy_pct":{"queue worker 0x0":73.316,"queue worker 0x43":77.34,"queue worker 0x21":10.509,"queue worker 0x52":0.25,"queue worker 0x50":0.187,"queue worker 0x29":9.595,"queue worker 0x56":96.463,"queue worker 0x49":35.609,"queue worker 0x41":32.881,"queue worker 0x31":14.157,"queue worker 0x39":43.454},"top_phases_ms_per_frame":{"Driver.Packet":993.112,"Driver.Packet.memory_wait":620.976,"Driver.Packet.dispatch":235.123,"Driver.Dispatch":205.303,"Driver.Packet.draw":107.265,"Driver.Draw":106.82,"Graphics.Draw":86.683,"Graphics.Draw.draw_and_resource_release":82.868},"trace_dropped":false,"trace":"aps5-trace-fda3f6ca6c0c-1527350.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2534: 302.5 ms at 7801 ms: Driver.Packet (queue worker 0x39) 230.9, Driver.Packet (queue worker 0x43) 224.8, Driver.Packet (queue worker 0x0) 191.6, Driver.WorkerWait (queue worker 0x21) 191.3
  • present 2503: 291.2 ms at 0 ms: Driver.WorkerWait (queue worker 0x52) 290.5, Driver.WorkerWait (queue worker 0x50) 290.5, Driver.WorkerWait.dequeue_order (queue worker 0x50) 281.6, Driver.WorkerWait.dequeue_order (queue worker 0x52) 281.4
  • present 2520: 282.3 ms at 4240 ms: Driver.Packet (queue worker 0x56) 282.1, Driver.Packet (queue worker 0x49) 281.8, Driver.WorkerWait (queue worker 0x52) 281.8, Driver.WorkerWait (queue worker 0x50) 281.8
  • present 2532: 278.1 ms at 7263 ms: Driver.Packet (queue worker 0x56) 278.0, Driver.Packet (queue worker 0x49) 277.9, Driver.WorkerWait (queue worker 0x52) 277.5, Driver.WorkerWait (queue worker 0x50) 277.5
  • present 2531: 273.8 ms at 6989 ms: Driver.Packet (queue worker 0x56) 273.6, Driver.WorkerWait (queue worker 0x50) 273.3, Driver.WorkerWait (queue worker 0x52) 273.2, Driver.Packet.memory_wait (queue worker 0x56) 271.8

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
queue worker 0x0 127.3 (50 %) 97.0 (38 %) 28.9 152.3 Driver.Packet 159.1, Driver.Rewind 0.3
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
presenter 0.4 (0 %) 0.2 (0 %) 252.7 0.1 VideoOut.Flip 0.6, Driver.Present 0.0
draw committer 39.8 (16 %) 0.6 (0 %) 212.9 25.1 Graphics.Draw 30.4, Recorder.Sync 8.6
queue worker 0x43 68.1 (27 %) 182.1 (72 %) 3.1 3.3 Driver.Packet 194.9, Driver.EndSubmission 0.1
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
queue worker 0x21 12.8 (5 %) 238.0 (94 %) 2.4 6.1 Driver.Packet 25.5, Driver.EndSubmission 0.7
queue worker 0x52 0.4 (0 %) 244.5 (97 %) 8.3 0.2 Driver.Packet 0.6, Driver.EndSubmission 0.0
queue worker 0x50 0.3 (0 %) 244.6 (97 %) 8.3 0.3 Driver.Packet 0.3, Driver.EndSubmission 0.1
queue worker 0x29 12.5 (5 %) 232.1 (92 %) 8.6 6.3 Driver.Packet 23.4, Driver.EndSubmission 0.5
queue worker 0x56 1.1 (0 %) 243.1 (96 %) 9.1 0.8 Driver.Packet 244.1, Driver.EndSubmission 0.0
queue worker 0x49 10.5 (4 %) 234.3 (93 %) 8.5 4.6 Driver.Packet 89.4, Driver.EndSubmission 0.5
queue worker 0x41 12.0 (5 %) 232.7 (92 %) 8.6 5.9 Driver.Packet 82.6, Driver.EndSubmission 0.3
queue worker 0x31 12.7 (5 %) 232.1 (92 %) 8.4 6.3 Driver.Packet 34.9, Driver.EndSubmission 0.6
queue worker 0x39 13.5 (5 %) 237.2 (94 %) 2.6 6.3 Driver.Packet 109.1, Driver.EndSubmission 0.6
gpu 93.9 (37 %) 0.0 (0 %) 159.4 0.0 batch 93.9

Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 1718.2, Driver.WorkerWait.dequeue_order 1684.3, Driver.Packet 963.9, Driver.Packet.memory_wait 620.6, Driver.Packet.dispatch 233.7, Driver.Dispatch 198.5, batch 93.9, Driver.Packet.draw 92.8, Driver.Draw 92.6, Graphics.Draw 74.4

Longest waits

  • Driver.WorkerWait (queue worker 0x50) 315.4 ms at 3193 ms, present 2515
  • Driver.WorkerWait (queue worker 0x52) 293.4 ms at 994 ms, present 2506
  • Driver.Packet.memory_wait (queue worker 0x56) 291.0 ms at 4307 ms, present 2520
  • Driver.WorkerWait (queue worker 0x52) 290.5 ms at 1 ms, present 2503
  • Driver.WorkerWait (queue worker 0x50) 290.5 ms at 1 ms, present 2503
  • Driver.Packet.memory_wait (queue worker 0x56) 288.1 ms at 7062 ms, present 2531
  • Driver.WorkerWait (queue worker 0x52) 281.8 ms at 4241 ms, present 2520
  • Driver.WorkerWait (queue worker 0x50) 281.8 ms at 4241 ms, present 2520
  • Driver.Packet.memory_wait (queue worker 0x56) 279.9 ms at 78 ms, present 2503
  • Driver.WorkerWait (queue worker 0x52) 277.5 ms at 7263 ms, present 2532

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 218: 5.5 ms at 482 ms, present 2504: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 5.7, Driver.Packet.draw (queue worker 0x0) 5.1, Driver.Draw (queue worker 0x0) 5.0, Driver.Draw.shader_compile_and_link (queue worker 0x0) 2.4

  • batch 515: 5.4 ms at 1091 ms, present 2507: GPU no ranges; recorded by no CPU slices

  • batch 1408: 5.2 ms at 2940 ms, present 2514: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 5.7, Driver.Packet.draw (queue worker 0x0) 5.1, Driver.Draw (queue worker 0x0) 5.1, Driver.Draw.shader_compile_and_link (queue worker 0x0) 2.6

  • batch 266: 5.1 ms at 569 ms, present 2505: GPU no ranges; recorded by no CPU slices

  • batch 1904: 5.1 ms at 3990 ms, present 2519: GPU no ranges; recorded by Driver.Packet (queue worker 0x39) 9.5, Driver.Packet.dispatch (queue worker 0x39) 9.5, Driver.Dispatch (queue worker 0x39) 9.0, GpuMutex.wait.dispatch (queue worker 0x39) 7.2

    Toggling the variable on one build of a local stack of open PRs gave the same direction: 36.2 vs 40.4 presents per 10 s in the prison, and 13.3 vs 14.8 in The Lost Legacy's Sri Lanka.

The variable stays opt-in because APS5_JOB_AFFINITY measured 0 to -9 % at a video stage in the title it was written for.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: PPSA05684 #4001 (frame rate)
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti SUPER, driver 615.78.08, Arch Linux 7.2.11-zen
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5056099336 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12544). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-28T19:02:33Z. --- ### What On a hybrid CPU the queue workers and the presenter run on the performance cores by default on Linux (#626). Guest threads have no host affinity: the affinity a title sets is kept for its getters but never applied to the host thread. A title whose job workers spin at full load on every core they own therefore puts those spinners on the same performance cores, often on the second hardware thread of a core a queue worker runs on. `APS5_GUEST_AFFINITY=1` now pins every guest thread to the efficiency cores of a hybrid CPU when it starts, on Linux and Windows. `APS5_GUEST_AFFINITY_MASK=<hex>` picks the cores instead. Both are off by default, like `APS5_JOB_AFFINITY`. That variable selects threads by one title's job worker name and is Windows only; the new one does not look at thread names. ### Tested Arch Linux 7.2.11-zen, GCC 16.2.1, Ninja, Release, on `main` 3a2b919816, Intel Core i9-14900KF (8 performance cores with 2 threads each, 16 efficiency cores): - New `guest_thread_host_affinity` (Linux): sets `APS5_GUEST_AFFINITY_MASK` to one core of the process and checks that two guest threads run on exactly that core, and that the creating thread keeps its mask. With `Thread.cpp` from `main` it fails: `a guest thread does not run on the cores APS5_GUEST_AFFINITY_MASK names`. - Full `ctest -j8` on the first base (`main` 3b362ba2e0): all 2741 tests pass (60 skipped). Rebased on 3a2b919816: `guest_thread_host_affinity` and the `guest_pthread*` tests pass (56/56). - `tools/check_conventions.py --base origin/main` passes. - PPSA05684 (Uncharted: Legacy of Thieves Collection): its 13 job workers (`NdJobWorkerThread 0`..`12`) spin with `pause` at 100 % each. With `APS5_GUEST_AFFINITY=1` they run on the efficiency cores. The captures below follow the Performance report form. They come from clean builds of `main` 3a2b919816 and of this branch, fda3f6ca6c (`"dirty": false` in both), captured on the same machine in the same session, with warm caches. Both capture the Uncharted 4 prison yard fight, reached through the developer menu by the same scripted inputs, with `APS5_TRACE_SECONDS=195:8` and no other `APS5_TRACE_*` or `APS5_PROFILE_*` switch. The environments differ only in `APS5_GUEST_AFFINITY`. The `APS5_LOCAL_*` names come from my launch script and do not exist on `main`. The 8 s window keeps queue 0 inside its default event buffer, so neither trace drops events. The launch script writes the log to a file in both runs; the logger reports 0.2 to 4.4 KiB per 10 s there. | | `main` 3a2b919816 | This branch with `APS5_GUEST_AFFINITY=1` | |---|---|---| | Presents in 8 s | 28 | 32 | | Frame p50 / p90 / p99 | 282.4 / 308.3 / 359.7 ms | 250.1 / 278.1 / 302.5 ms | | GPU busy per present | 104.7 ms | 93.9 ms | | `queue worker 0x0` busy | 140.2 ms per frame | 127.3 ms per frame | | Dropped trace events | none | none | Clean `main` does not reach this scene every time. Over 7 attempts in this session on the two builds, 5 ended early: - 3 times, a sampled view of 2.5 to 40 GiB (2560x1440 or 1280x720 arrays with hundreds of slices, in no guest allocation) ran out of memory, killed by my memory watchdog or as `std::bad_alloc`. - Once, `vkWaitForFences` returned `VK_ERROR_DEVICE_LOST`. - Once, my memory watchdog killed the run without a view in the log. The oversized views and the device loss do not happen on the local stack. The captures are from the runs that reached the fight. Traces: [`main`](https://github.com/XairRrR/AnyPS5/releases/download/perf-12544-traces/aps5-trace-3a2b91981651-1495087.json.gz), [this branch](https://github.com/XairRrR/AnyPS5/releases/download/perf-12544-traces/aps5-trace-fda3f6ca6c0c-1527350.json.gz) Summary line, `main`: ```json {"commit":"3a2b91981651","dirty":false,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"195:8"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted™: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 195:8","first_present":2410,"ms":8012.792},"presents":28,"frame_ms":{"p50":282.420,"p90":308.327,"p99":359.737,"max":359.737},"gpu_busy_ms_per_present":104.734,"worker_busy_pct":{"queue worker 0x0":72.598,"queue worker 0x43":77.285,"queue worker 0x21":12.541,"queue worker 0x50":0.192,"queue worker 0x52":0.244,"queue worker 0x29":20.896,"queue worker 0x56":96.338,"queue worker 0x31":36.244,"queue worker 0x39":45.045,"queue worker 0x49":19.195,"queue worker 0x41":35.466},"top_phases_ms_per_frame":{"Driver.Packet":1186.075,"Driver.Packet.memory_wait":758.571,"Driver.Packet.dispatch":276.247,"Driver.Dispatch":244.039,"Driver.Packet.draw":118.164,"Driver.Draw":117.662,"Graphics.Draw":96.348,"Graphics.Draw.draw_and_resource_release":92.135},"trace_dropped":false,"trace":"aps5-trace-3a2b91981651-1495087.json.gz"} ``` Summary line, this branch: ```json {"commit":"fda3f6ca6c0c","dirty":false,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_GUEST_AFFINITY":"1","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"195:8"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted™: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 195:8","first_present":2503,"ms":8103.759},"presents":32,"frame_ms":{"p50":250.076,"p90":278.090,"p99":302.491,"max":302.491},"gpu_busy_ms_per_present":93.863,"worker_busy_pct":{"queue worker 0x0":73.316,"queue worker 0x43":77.340,"queue worker 0x21":10.509,"queue worker 0x52":0.250,"queue worker 0x50":0.187,"queue worker 0x29":9.595,"queue worker 0x56":96.463,"queue worker 0x49":35.609,"queue worker 0x41":32.881,"queue worker 0x31":14.157,"queue worker 0x39":43.454},"top_phases_ms_per_frame":{"Driver.Packet":993.112,"Driver.Packet.memory_wait":620.976,"Driver.Packet.dispatch":235.123,"Driver.Dispatch":205.303,"Driver.Packet.draw":107.265,"Driver.Draw":106.820,"Graphics.Draw":86.683,"Graphics.Draw.draw_and_resource_release":82.868},"trace_dropped":false,"trace":"aps5-trace-fda3f6ca6c0c-1527350.json.gz"} ``` <details><summary><code>tools/trace_digest.py</code>, <code>main</code></summary> **seconds 195:8** from present 2410: 28 presents, frame p50 282.4 / p90 308.3 / p99 359.7 / max 359.7 ms, GPU busy 104.7 ms per present NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit 3a2b91981651, dropped: no ```json {"commit":"3a2b91981651","dirty":false,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"195:8"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted\u2122: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 195:8","first_present":2410,"ms":8012.792},"presents":28,"frame_ms":{"p50":282.42,"p90":308.327,"p99":359.737,"max":359.737},"gpu_busy_ms_per_present":104.734,"worker_busy_pct":{"queue worker 0x0":72.598,"queue worker 0x43":77.285,"queue worker 0x21":12.541,"queue worker 0x50":0.192,"queue worker 0x52":0.244,"queue worker 0x29":20.896,"queue worker 0x56":96.338,"queue worker 0x31":36.244,"queue worker 0x39":45.045,"queue worker 0x49":19.195,"queue worker 0x41":35.466},"top_phases_ms_per_frame":{"Driver.Packet":1186.075,"Driver.Packet.memory_wait":758.571,"Driver.Packet.dispatch":276.247,"Driver.Dispatch":244.039,"Driver.Packet.draw":118.164,"Driver.Draw":117.662,"Graphics.Draw":96.348,"Graphics.Draw.draw_and_resource_release":92.135},"trace_dropped":false,"trace":"aps5-trace-3a2b91981651-1495087.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 2412: 359.7 ms at 561 ms: Driver.Packet (queue worker 0x56) 359.5, Driver.WorkerWait (queue worker 0x52) 359.2, Driver.WorkerWait (queue worker 0x50) 358.7, Driver.Packet.memory_wait (queue worker 0x56) 357.5 - present 2431: 342.6 ms at 5988 ms: Driver.WorkerWait (queue worker 0x52) 342.6, Driver.Packet (queue worker 0x56) 342.4, Driver.Packet (queue worker 0x31) 342.0, Driver.WorkerWait (queue worker 0x50) 341.9 - present 2417: 308.3 ms at 2009 ms: Driver.Packet (queue worker 0x56) 308.2, Driver.WorkerWait (queue worker 0x52) 307.7, Driver.WorkerWait (queue worker 0x50) 307.6, Driver.Packet (queue worker 0x39) 307.4 - present 2426: 305.1 ms at 4539 ms: Driver.Packet (queue worker 0x56) 304.9, Driver.WorkerWait (queue worker 0x52) 304.6, Driver.WorkerWait (queue worker 0x50) 304.5, Driver.Packet (queue worker 0x41) 304.4 - present 2432: 300.0 ms at 6330 ms: Driver.Packet (queue worker 0x56) 299.8, Driver.WorkerWait (queue worker 0x52) 299.3, Driver.Packet (queue worker 0x39) 299.2, Driver.WorkerWait (queue worker 0x50) 298.5 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.0 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | queue worker 0x0 | 140.2 (49 %) | 114.5 (40 %) | 31.4 | 158.5 | Driver.Packet 179.0, Driver.Rewind 0.3 | | title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | draw committer | 45.4 (16 %) | 0.7 (0 %) | 240.1 | 25.8 | Graphics.Draw 35.0, Recorder.Sync 9.6 | | presenter | 0.7 (0 %) | 0.5 (0 %) | 284.9 | 0.1 | VideoOut.Flip 1.1, Driver.Present 0.2 | | queue worker 0x43 | 79.8 (28 %) | 203.3 (71 %) | 3.1 | 3.3 | Driver.Packet 220.0, Driver.EndSubmission 0.3 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | queue worker 0x21 | 14.7 (5 %) | 268.9 (94 %) | 2.5 | 6.2 | Driver.Packet 35.0, Driver.EndSubmission 0.5 | | queue worker 0x50 | 0.4 (0 %) | 275.9 (96 %) | 9.9 | 0.2 | Driver.Packet 0.4, Driver.EndSubmission 0.0 | | queue worker 0x52 | 0.4 (0 %) | 275.9 (96 %) | 9.9 | 0.2 | Driver.Packet 0.6 | | queue worker 0x29 | 15.0 (5 %) | 261.2 (91 %) | 10.0 | 6.2 | Driver.Packet 58.9, Driver.EndSubmission 0.5 | | queue worker 0x56 | 1.2 (0 %) | 274.3 (96 %) | 10.6 | 0.9 | Driver.Packet 275.5, Driver.EndSubmission 0.0 | | queue worker 0x31 | 15.2 (5 %) | 261.3 (91 %) | 9.7 | 6.1 | Driver.Packet 102.5, Driver.EndSubmission 0.8 | | queue worker 0x39 | 14.7 (5 %) | 262.2 (92 %) | 9.3 | 6.1 | Driver.Packet 127.9, Driver.EndSubmission 0.7 | | queue worker 0x49 | 11.2 (4 %) | 265.5 (93 %) | 9.5 | 4.4 | Driver.Packet 54.1, Driver.EndSubmission 0.5 | | queue worker 0x41 | 14.4 (5 %) | 269.3 (94 %) | 2.5 | 6.0 | Driver.Packet 100.6, Driver.EndSubmission 0.5 | | gpu | 104.5 (37 %) | 0.0 (0 %) | 181.7 | 0.0 | batch 104.5 | **Largest slices** (ms per frame, inclusive, all threads): Driver.WorkerWait 1880.2, Driver.WorkerWait.dequeue_order 1848.5, Driver.Packet 1154.7, Driver.Packet.memory_wait 758.2, Driver.Packet.dispatch 274.9, Driver.Dispatch 237.3, batch 104.5, Driver.Packet.draw 102.6, Driver.Draw 102.3, Graphics.Draw 84.3 **Longest waits** - Driver.WorkerWait (queue worker 0x52) 396.9 ms at 5933 ms, present 2430 - Driver.WorkerWait (queue worker 0x52) 359.3 ms at 561 ms, present 2412 - Driver.Packet.memory_wait (queue worker 0x56) 355.7 ms at 363 ms, present 2411 - Driver.WorkerWait (queue worker 0x50) 341.9 ms at 5988 ms, present 2431 - Driver.WorkerWait (queue worker 0x49) 334.7 ms at 586 ms, present 2412 - Driver.Packet.memory_wait (queue worker 0x56) 330.8 ms at 6073 ms, present 2431 - Driver.WorkerWait (queue worker 0x50) 330.5 ms at 874 ms, present 2412 - Driver.WorkerWait (queue worker 0x50) 325.4 ms at 1429 ms, present 2414 - Driver.WorkerWait (queue worker 0x29) 322.7 ms at 598 ms, present 2412 - Driver.Packet.memory_wait (queue worker 0x41) 317.4 ms at 6026 ms, present 2431 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 662: 6.4 ms at 1521 ms, present 2415: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x0) 29.6, Driver.WorkerWait.dequeue_order (queue worker 0x0) 29.6, Driver.Packet (queue worker 0x0) 2.6, Driver.Packet.pipeline_drain (queue worker 0x0) 1.3 - batch 358: 6.1 ms at 863 ms, present 2412: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.4, Driver.Packet.draw (queue worker 0x0) 6.4, Driver.Draw (queue worker 0x0) 6.4, Driver.Draw.shader_compile_and_link (queue worker 0x0) 3.4 - batch 2184: 6.1 ms at 4894 ms, present 2427: GPU no ranges; recorded by Recorder.Submit (draw committer) 2.0, Recorder.Reap (draw committer) 0.1, Graphics.Draw (draw committer) 0.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.0 - batch 3183: 6.0 ms at 7212 ms, present 2435: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x0) 44.8, Driver.WorkerWait.dequeue_order (queue worker 0x0) 44.8, Driver.Packet (queue worker 0x0) 2.9, Driver.Packet.draw (queue worker 0x0) 1.2 - batch 2435: 6.0 ms at 5445 ms, present 2429: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x0) 46.0, Driver.WorkerWait.dequeue_order (queue worker 0x0) 46.0, Driver.Packet (queue worker 0x0) 1.9, Driver.Packet.pipeline_drain (queue worker 0x0) 0.8 </details> <details><summary><code>tools/trace_digest.py</code>, this branch</summary> **seconds 195:8** from present 2503: 32 presents, frame p50 250.1 / p90 278.1 / p99 302.5 / max 302.5 ms, GPU busy 93.9 ms per present NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit fda3f6ca6c0c, dropped: no ```json {"commit":"fda3f6ca6c0c","dirty":false,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_GUEST_AFFINITY":"1","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"195:8"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted\u2122: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 195:8","first_present":2503,"ms":8103.759},"presents":32,"frame_ms":{"p50":250.076,"p90":278.09,"p99":302.491,"max":302.491},"gpu_busy_ms_per_present":93.863,"worker_busy_pct":{"queue worker 0x0":73.316,"queue worker 0x43":77.34,"queue worker 0x21":10.509,"queue worker 0x52":0.25,"queue worker 0x50":0.187,"queue worker 0x29":9.595,"queue worker 0x56":96.463,"queue worker 0x49":35.609,"queue worker 0x41":32.881,"queue worker 0x31":14.157,"queue worker 0x39":43.454},"top_phases_ms_per_frame":{"Driver.Packet":993.112,"Driver.Packet.memory_wait":620.976,"Driver.Packet.dispatch":235.123,"Driver.Dispatch":205.303,"Driver.Packet.draw":107.265,"Driver.Draw":106.82,"Graphics.Draw":86.683,"Graphics.Draw.draw_and_resource_release":82.868},"trace_dropped":false,"trace":"aps5-trace-fda3f6ca6c0c-1527350.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 2534: 302.5 ms at 7801 ms: Driver.Packet (queue worker 0x39) 230.9, Driver.Packet (queue worker 0x43) 224.8, Driver.Packet (queue worker 0x0) 191.6, Driver.WorkerWait (queue worker 0x21) 191.3 - present 2503: 291.2 ms at 0 ms: Driver.WorkerWait (queue worker 0x52) 290.5, Driver.WorkerWait (queue worker 0x50) 290.5, Driver.WorkerWait.dequeue_order (queue worker 0x50) 281.6, Driver.WorkerWait.dequeue_order (queue worker 0x52) 281.4 - present 2520: 282.3 ms at 4240 ms: Driver.Packet (queue worker 0x56) 282.1, Driver.Packet (queue worker 0x49) 281.8, Driver.WorkerWait (queue worker 0x52) 281.8, Driver.WorkerWait (queue worker 0x50) 281.8 - present 2532: 278.1 ms at 7263 ms: Driver.Packet (queue worker 0x56) 278.0, Driver.Packet (queue worker 0x49) 277.9, Driver.WorkerWait (queue worker 0x52) 277.5, Driver.WorkerWait (queue worker 0x50) 277.5 - present 2531: 273.8 ms at 6989 ms: Driver.Packet (queue worker 0x56) 273.6, Driver.WorkerWait (queue worker 0x50) 273.3, Driver.WorkerWait (queue worker 0x52) 273.2, Driver.Packet.memory_wait (queue worker 0x56) 271.8 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 253.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 253.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 253.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 253.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | queue worker 0x0 | 127.3 (50 %) | 97.0 (38 %) | 28.9 | 152.3 | Driver.Packet 159.1, Driver.Rewind 0.3 | | title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 | | presenter | 0.4 (0 %) | 0.2 (0 %) | 252.7 | 0.1 | VideoOut.Flip 0.6, Driver.Present 0.0 | | draw committer | 39.8 (16 %) | 0.6 (0 %) | 212.9 | 25.1 | Graphics.Draw 30.4, Recorder.Sync 8.6 | | queue worker 0x43 | 68.1 (27 %) | 182.1 (72 %) | 3.1 | 3.3 | Driver.Packet 194.9, Driver.EndSubmission 0.1 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 | | queue worker 0x21 | 12.8 (5 %) | 238.0 (94 %) | 2.4 | 6.1 | Driver.Packet 25.5, Driver.EndSubmission 0.7 | | queue worker 0x52 | 0.4 (0 %) | 244.5 (97 %) | 8.3 | 0.2 | Driver.Packet 0.6, Driver.EndSubmission 0.0 | | queue worker 0x50 | 0.3 (0 %) | 244.6 (97 %) | 8.3 | 0.3 | Driver.Packet 0.3, Driver.EndSubmission 0.1 | | queue worker 0x29 | 12.5 (5 %) | 232.1 (92 %) | 8.6 | 6.3 | Driver.Packet 23.4, Driver.EndSubmission 0.5 | | queue worker 0x56 | 1.1 (0 %) | 243.1 (96 %) | 9.1 | 0.8 | Driver.Packet 244.1, Driver.EndSubmission 0.0 | | queue worker 0x49 | 10.5 (4 %) | 234.3 (93 %) | 8.5 | 4.6 | Driver.Packet 89.4, Driver.EndSubmission 0.5 | | queue worker 0x41 | 12.0 (5 %) | 232.7 (92 %) | 8.6 | 5.9 | Driver.Packet 82.6, Driver.EndSubmission 0.3 | | queue worker 0x31 | 12.7 (5 %) | 232.1 (92 %) | 8.4 | 6.3 | Driver.Packet 34.9, Driver.EndSubmission 0.6 | | queue worker 0x39 | 13.5 (5 %) | 237.2 (94 %) | 2.6 | 6.3 | Driver.Packet 109.1, Driver.EndSubmission 0.6 | | gpu | 93.9 (37 %) | 0.0 (0 %) | 159.4 | 0.0 | batch 93.9 | **Largest slices** (ms per frame, inclusive, all threads): Driver.WorkerWait 1718.2, Driver.WorkerWait.dequeue_order 1684.3, Driver.Packet 963.9, Driver.Packet.memory_wait 620.6, Driver.Packet.dispatch 233.7, Driver.Dispatch 198.5, batch 93.9, Driver.Packet.draw 92.8, Driver.Draw 92.6, Graphics.Draw 74.4 **Longest waits** - Driver.WorkerWait (queue worker 0x50) 315.4 ms at 3193 ms, present 2515 - Driver.WorkerWait (queue worker 0x52) 293.4 ms at 994 ms, present 2506 - Driver.Packet.memory_wait (queue worker 0x56) 291.0 ms at 4307 ms, present 2520 - Driver.WorkerWait (queue worker 0x52) 290.5 ms at 1 ms, present 2503 - Driver.WorkerWait (queue worker 0x50) 290.5 ms at 1 ms, present 2503 - Driver.Packet.memory_wait (queue worker 0x56) 288.1 ms at 7062 ms, present 2531 - Driver.WorkerWait (queue worker 0x52) 281.8 ms at 4241 ms, present 2520 - Driver.WorkerWait (queue worker 0x50) 281.8 ms at 4241 ms, present 2520 - Driver.Packet.memory_wait (queue worker 0x56) 279.9 ms at 78 ms, present 2503 - Driver.WorkerWait (queue worker 0x52) 277.5 ms at 7263 ms, present 2532 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 218: 5.5 ms at 482 ms, present 2504: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 5.7, Driver.Packet.draw (queue worker 0x0) 5.1, Driver.Draw (queue worker 0x0) 5.0, Driver.Draw.shader_compile_and_link (queue worker 0x0) 2.4 - batch 515: 5.4 ms at 1091 ms, present 2507: GPU no ranges; recorded by no CPU slices - batch 1408: 5.2 ms at 2940 ms, present 2514: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 5.7, Driver.Packet.draw (queue worker 0x0) 5.1, Driver.Draw (queue worker 0x0) 5.1, Driver.Draw.shader_compile_and_link (queue worker 0x0) 2.6 - batch 266: 5.1 ms at 569 ms, present 2505: GPU no ranges; recorded by no CPU slices - batch 1904: 5.1 ms at 3990 ms, present 2519: GPU no ranges; recorded by Driver.Packet (queue worker 0x39) 9.5, Driver.Packet.dispatch (queue worker 0x39) 9.5, Driver.Dispatch (queue worker 0x39) 9.0, GpuMutex.wait.dispatch (queue worker 0x39) 7.2 </details> Toggling the variable on one build of a local stack of open PRs gave the same direction: 36.2 vs 40.4 presents per 10 s in the prison, and 13.3 vs 14.8 in The Lost Legacy's Sri Lanka. The variable stays opt-in because `APS5_JOB_AFFINITY` measured 0 to -9 % at a video stage in the title it was written for. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: PPSA05684 #4001 (frame rate) - [x] GPUs tested: NVIDIA GeForce RTX 4070 Ti SUPER, driver 615.78.08, Arch Linux 7.2.11-zen - [x] AI-assisted: yes
adriadam10 commented 2026-10-28 19:12:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-28T19:12:44Z.

Review: CHANGES_REQUESTED


The code and the test look right (guest_thread_host_affinity fails without the Thread.cpp change), and keeping it opt-in is reasonable. One thing is missing before merging:

  • The perf label needs the evidence the Performance report form asks for (see the bot comment above): the aps5-summary.jsonl line of a capture on main and one with the change, from the same title, scene and machine, both traces attached, and the output of tools/trace_digest.py for each. The table in ### Tested has the numbers but not the captures behind them. Please paste those and the PR can go on.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5688288088 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12544#pullrequestreview-5688288088). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-28T19:12:44Z. **Review:** CHANGES_REQUESTED --- The code and the test look right (`guest_thread_host_affinity` fails without the `Thread.cpp` change), and keeping it opt-in is reasonable. One thing is missing before merging: - The `perf` label needs the evidence the Performance report form asks for (see the bot comment above): the `aps5-summary.jsonl` line of a capture on `main` and one with the change, from the same title, scene and machine, both traces attached, and the output of `tools/trace_digest.py` for each. The table in `### Tested` has the numbers but not the captures behind them. Please paste those and the PR can go on.
MarcZX10 commented 2026-10-28 19:21:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T19:21:05Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The affinity change and its focused test build successfully, but this perf PR is missing the paired trace evidence required by the repository's performance-report rules.

What I ran

Reviewed exact head d74683cb2b088c1d2c596e47b92a437cd4dd994e against current main 319621ba2e578bd053b0baba2877fe70520e0737; the merge tree is clean. Environment: Debian 12 x86_64, GCC 12.2.0, CMake, Ninja.

git diff --check refs/review/current-main...refs/review/12544
git merge-tree --write-tree refs/review/current-main refs/review/12544
cmake -S /tmp/AnyPS5-review-12544 -B /tmp/AnyPS5-review-12544/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
cmake --build /tmp/AnyPS5-review-12544/build --target guest_thread_host_affinity_tests -j4
ctest --test-dir /tmp/AnyPS5-review-12544/build -R '^guest_thread_host_affinity$' --output-on-failure
gh pr checks 12544 --repo boykopovar/AnyPS5

Results

Check Result
Merge with current main Clean
Diff check Passed; no output
CMake configure Passed
guest_thread_host_affinity_tests build Passed, 196/196 build steps
guest_thread_host_affinity Did not reach assertions: the host CPU guard aborts on this Xeon E5-1620 v2, which lacks required AVX2/FMA and other extensions
Conventions, eligibility, intake, labels, report Passed
Hosted Windows Job passed; changed test selection and CTest were skipped, and changed host-only test executables linked
Hosted Linux, register-context, relinker, ASan, write-watch Skipped by workflow
Raw output
3f32fd9561cfb012905bcb98478f740733bfa66e
[195/196] Building CXX object core/libs/prx/libkernel/CMakeFiles/libkernel.dir/Time/Time.cpp.o
[196/196] Linking CXX executable tests/guest_thread_host_affinity_tests
1/1 Test #2311: guest_thread_host_affinity .......Subprocess aborted***Exception:   0.01 sec
[src/HostCpu.cpp:193 operator()] host CPU Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, CMPXCHG16B, LAHF/SAHF, AVX, F16C, AES, PCLMULQDQ, RDRAND, XSAVEOPT, OS AVX state (XCR0); lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, FMA, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEC, SSE4A, PREFETCHW, CLZERO
[libc] unhandled exception 'St13runtime_error' thrown from 0x7f86db880e4d
terminate called after throwing an instance of 'std::runtime_error'
  what():  The host CPU (Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz) lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, FMA. The PS5's Zen 2 CPU has these extensions and titles run their instructions natively, so this CPU cannot run them.
labels	pass	11s
windows	pass	9m35s
linux	skipping	0
register-context	skipping	0
relinker	skipping	0
relinker-asan	skipping	0
write-watch	skipping	0
conventions	pass	15s
eligibility	pass	5s
intake	pass	6s
report	pass	40s

Negative control

Assertion Change made to code under test Did the new test fail?
A guest thread receives the requested host CPU mask while the creating thread keeps its mask. No mutation; the test aborted in the project CPU guard before assertions. Not exercised.

Findings

Blocking: The PR is labeled perf, but it does not include the two aps5-summary.jsonl lines for main and the change, the matching trace attachments, or tools/trace_digest.py output. The report form requires those captures from the same machine, title, scene, and settings; the current presents-per-10-second table does not provide the requested capture data. Please attach both traces, paste both summary lines, and include each digest output.

Non-blocking: This host cannot run the focused test because it fails the project's CPU-feature guard before reaching test assertions. The hosted Windows job linked changed host-only test targets but skipped CTest; the Linux and specialized jobs were skipped. The PR description reports separate Linux test runs and title measurements, which I did not independently reproduce.

Sources

Not verified

I could not run the test assertions on this CPU, independently verify the hybrid-core behavior on supported hardware, reproduce the title captures, or verify the reported performance delta. A QEMU rerun was unavailable because the temporary worktree and executable were no longer present after the first CTest attempt.

To get this to a good state

Attach the paired base/change traces, paste their aps5-summary.jsonl lines, and add the output of python3 tools/trace_digest.py for each trace. Please also run guest_thread_host_affinity on a CPU that passes the project's feature guard. I will rerun the same review commands against the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5688414126 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12544#pullrequestreview-5688414126). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T19:21:05Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The affinity change and its focused test build successfully, but this `perf` PR is missing the paired trace evidence required by the repository's performance-report rules. ### What I ran Reviewed exact head `d74683cb2b088c1d2c596e47b92a437cd4dd994e` against current `main` `319621ba2e578bd053b0baba2877fe70520e0737`; the merge tree is clean. Environment: Debian 12 x86_64, GCC 12.2.0, CMake, Ninja. ```sh git diff --check refs/review/current-main...refs/review/12544 git merge-tree --write-tree refs/review/current-main refs/review/12544 cmake -S /tmp/AnyPS5-review-12544 -B /tmp/AnyPS5-review-12544/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON cmake --build /tmp/AnyPS5-review-12544/build --target guest_thread_host_affinity_tests -j4 ctest --test-dir /tmp/AnyPS5-review-12544/build -R '^guest_thread_host_affinity$' --output-on-failure gh pr checks 12544 --repo boykopovar/AnyPS5 ``` ### Results | Check | Result | |---|---| | Merge with current `main` | Clean | | Diff check | Passed; no output | | CMake configure | Passed | | `guest_thread_host_affinity_tests` build | Passed, 196/196 build steps | | `guest_thread_host_affinity` | Did not reach assertions: the host CPU guard aborts on this Xeon E5-1620 v2, which lacks required AVX2/FMA and other extensions | | Conventions, eligibility, intake, labels, report | Passed | | Hosted Windows | Job passed; changed test selection and CTest were skipped, and changed host-only test executables linked | | Hosted Linux, register-context, relinker, ASan, write-watch | Skipped by workflow | <details><summary>Raw output</summary> ```text 3f32fd9561cfb012905bcb98478f740733bfa66e ``` ```text [195/196] Building CXX object core/libs/prx/libkernel/CMakeFiles/libkernel.dir/Time/Time.cpp.o [196/196] Linking CXX executable tests/guest_thread_host_affinity_tests ``` ```text 1/1 Test #2311: guest_thread_host_affinity .......Subprocess aborted***Exception: 0.01 sec [src/HostCpu.cpp:193 operator()] host CPU Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, CMPXCHG16B, LAHF/SAHF, AVX, F16C, AES, PCLMULQDQ, RDRAND, XSAVEOPT, OS AVX state (XCR0); lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, FMA, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEC, SSE4A, PREFETCHW, CLZERO [libc] unhandled exception 'St13runtime_error' thrown from 0x7f86db880e4d terminate called after throwing an instance of 'std::runtime_error' what(): The host CPU (Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz) lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, FMA. The PS5's Zen 2 CPU has these extensions and titles run their instructions natively, so this CPU cannot run them. ``` ```text labels pass 11s windows pass 9m35s linux skipping 0 register-context skipping 0 relinker skipping 0 relinker-asan skipping 0 write-watch skipping 0 conventions pass 15s eligibility pass 5s intake pass 6s report pass 40s ``` </details> ### Negative control | Assertion | Change made to code under test | Did the new test fail? | |---|---|---| | A guest thread receives the requested host CPU mask while the creating thread keeps its mask. | No mutation; the test aborted in the project CPU guard before assertions. | Not exercised. | ### Findings **Blocking:** The PR is labeled `perf`, but it does not include the two `aps5-summary.jsonl` lines for `main` and the change, the matching trace attachments, or `tools/trace_digest.py` output. The report form requires those captures from the same machine, title, scene, and settings; the current presents-per-10-second table does not provide the requested capture data. Please attach both traces, paste both summary lines, and include each digest output. **Non-blocking:** This host cannot run the focused test because it fails the project's CPU-feature guard before reaching test assertions. The hosted Windows job linked changed host-only test targets but skipped CTest; the Linux and specialized jobs were skipped. The PR description reports separate Linux test runs and title measurements, which I did not independently reproduce. ### Sources - [Affinity implementation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/d74683cb2b088c1d2c596e47b92a437cd4dd994e/core/libs/prx/libkernel/Pthread/src/Thread.cpp) - [Focused affinity test at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/d74683cb2b088c1d2c596e47b92a437cd4dd994e/core/libs/tests/GuestThreadHostAffinity.cpp) - [Environment-variable documentation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/d74683cb2b088c1d2c596e47b92a437cd4dd994e/docs/dev/ENVIRONMENT.md) - [Performance-report requirements at the reviewed base](https://github.com/boykopovar/AnyPS5/blob/319621ba2e578bd053b0baba2877fe70520e0737/.github/ISSUE_TEMPLATE/performance.yml) - [PR and performance rules at the reviewed base](https://github.com/boykopovar/AnyPS5/blob/319621ba2e578bd053b0baba2877fe70520e0737/CONTRIBUTING.md) ### Not verified I could not run the test assertions on this CPU, independently verify the hybrid-core behavior on supported hardware, reproduce the title captures, or verify the reported performance delta. A QEMU rerun was unavailable because the temporary worktree and executable were no longer present after the first CTest attempt. ### To get this to a good state Attach the paired base/change traces, paste their `aps5-summary.jsonl` lines, and add the output of `python3 tools/trace_digest.py` for each trace. Please also run `guest_thread_host_affinity` on a CPU that passes the project's feature guard. I will rerun the same review commands against the updated head.
MarcZX10 commented 2026-10-29 01:25:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T01:25:31Z.

Review: CHANGES_REQUESTED


Re-checked — changes requested for the performance report

The code branch is now based on current main, and the new captures match their summary lines, but both captures use extra APS5_TRACE_* switches excluded by the required performance protocol.

What I ran

  • Reviewed exact head fda3f6ca6c0cbf3370ecd5fb580312f707ecc082 against main 3a2b91981651569163768854a1fcdc7193b6667b.
  • git diff --check upstream/main...refs/remotes/review/12544.
  • git merge-tree --write-tree upstream/main refs/remotes/review/12544.
  • python3 tools/check_conventions.py --base upstream/main --head refs/remotes/review/12544.
  • Downloaded the two attached trace assets and ran python3 tools/trace_digest.py <trace> --frames 2 --top 3, matching each provided summary line to its trace.

Results

Check Result
Current-main merge preview Clean; tree f0e052678e77fe66adfbceccab77b3f6ba4ce16c
Diff check Passed; no output
Conventions Passed
Main trace digest 54 presents; p50 278.5 ms; summary matches the attached trace; trace reports dropped events
Change trace digest 62 presents; p50 243.6 ms; summary matches the attached trace; trace reports dropped events
Updated-head focused tests 56/56 for guest_thread_host_affinity and guest_pthread*, author-reported; not rerun locally
Hosted checks at review time Windows build pending; Linux product and specialized jobs skipped; conventions, labels, eligibility, and report passed
Raw trace-digest output excerpts
**seconds 195:15** from present 2391: 54 presents, frame p50 278.5 / p90 313.4 / p99 342.6 / max 342.6 ms, GPU busy 93.2 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit 3a2b91981651, dropped: yes
**seconds 115:15** from present 2238: 62 presents, frame p50 243.6 / p90 264.0 / p99 335.2 / max 335.2 ms, GPU busy 89.7 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit fda3f6ca6c0c, dropped: yes

Negative control

No independent negative control was run on this rebased head. My prior local run on the earlier head built the test executable but stopped at the project CPU-feature guard before its assertions.

Findings

Blocking

  • Both summary lines set APS5_TRACE_SUMMARY_EVERY=10 and APS5_TRACE_DIR=<path>. The repository’s Performance report form requires no additional APS5_TRACE_* or APS5_PROFILE_* switches. Please recapture main and this head with only the required capture setting, then replace the summaries, traces, and digests. Both current digests also report dropped trace events; please check whether the prescribed recapture avoids that loss.

Non-blocking

  • The rebase brings the branch directly onto current main and preserves the single-topic diff. I independently checked the trace files and summary records, but did not rerun the affinity CTests on this host.
  • The reported single-run p50 improves from 278.5 ms to 243.6 ms; I am not treating that number as independently reproduced.

Sources

Not verified

  • Affinity assertions on this host or on a hybrid CPU.
  • PS5 behavior.
  • The updated hosted Windows build, which was pending when checked.
  • The reported title run independently.

To get this to a good state

Recapture both builds with the documented capture settings and no extra trace/profile switches, include the refreshed summary lines, traces, and digests, and confirm the digests no longer report dropped events if possible. I will recheck the updated report and hosted build on the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5691772001 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12544#pullrequestreview-5691772001). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T01:25:31Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes requested for the performance report The code branch is now based on current `main`, and the new captures match their summary lines, but both captures use extra `APS5_TRACE_*` switches excluded by the required performance protocol. ## What I ran - Reviewed exact head `fda3f6ca6c0cbf3370ecd5fb580312f707ecc082` against `main` `3a2b91981651569163768854a1fcdc7193b6667b`. - `git diff --check upstream/main...refs/remotes/review/12544`. - `git merge-tree --write-tree upstream/main refs/remotes/review/12544`. - `python3 tools/check_conventions.py --base upstream/main --head refs/remotes/review/12544`. - Downloaded the two attached trace assets and ran `python3 tools/trace_digest.py <trace> --frames 2 --top 3`, matching each provided summary line to its trace. ## Results | Check | Result | |---|---| | Current-main merge preview | Clean; tree `f0e052678e77fe66adfbceccab77b3f6ba4ce16c` | | Diff check | Passed; no output | | Conventions | Passed | | Main trace digest | 54 presents; p50 278.5 ms; summary matches the attached trace; trace reports dropped events | | Change trace digest | 62 presents; p50 243.6 ms; summary matches the attached trace; trace reports dropped events | | Updated-head focused tests | 56/56 for `guest_thread_host_affinity` and `guest_pthread*`, author-reported; not rerun locally | | Hosted checks at review time | Windows build pending; Linux product and specialized jobs skipped; conventions, labels, eligibility, and report passed | <details> <summary>Raw trace-digest output excerpts</summary> ```text **seconds 195:15** from present 2391: 54 presents, frame p50 278.5 / p90 313.4 / p99 342.6 / max 342.6 ms, GPU busy 93.2 ms per present NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit 3a2b91981651, dropped: yes ``` ```text **seconds 115:15** from present 2238: 62 presents, frame p50 243.6 / p90 264.0 / p99 335.2 / max 335.2 ms, GPU busy 89.7 ms per present NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit fda3f6ca6c0c, dropped: yes ``` </details> ## Negative control No independent negative control was run on this rebased head. My prior local run on the earlier head built the test executable but stopped at the project CPU-feature guard before its assertions. ## Findings ### Blocking - Both summary lines set `APS5_TRACE_SUMMARY_EVERY=10` and `APS5_TRACE_DIR=<path>`. The repository’s Performance report form requires no additional `APS5_TRACE_*` or `APS5_PROFILE_*` switches. Please recapture `main` and this head with only the required capture setting, then replace the summaries, traces, and digests. Both current digests also report dropped trace events; please check whether the prescribed recapture avoids that loss. ### Non-blocking - The rebase brings the branch directly onto current `main` and preserves the single-topic diff. I independently checked the trace files and summary records, but did not rerun the affinity CTests on this host. - The reported single-run p50 improves from 278.5 ms to 243.6 ms; I am not treating that number as independently reproduced. ## Sources - [Exact PR head diff](https://github.com/boykopovar/AnyPS5/compare/3a2b91981651569163768854a1fcdc7193b6667b...fda3f6ca6c0cbf3370ecd5fb580312f707ecc082) - [Performance report capture protocol at current main](https://github.com/boykopovar/AnyPS5/blob/3a2b91981651569163768854a1fcdc7193b6667b/.github/ISSUE_TEMPLATE/performance.yml) - [Contribution rules at current main](https://github.com/boykopovar/AnyPS5/blob/3a2b91981651569163768854a1fcdc7193b6667b/CONTRIBUTING.md#L66-L70) - [Main trace](https://github.com/XairRrR/AnyPS5/releases/download/perf-12544-traces/aps5-trace-3a2b91981651-1364286.json.gz) - [Change trace](https://github.com/XairRrR/AnyPS5/releases/download/perf-12544-traces/aps5-trace-fda3f6ca6c0c-1346110.json.gz) ## Not verified - Affinity assertions on this host or on a hybrid CPU. - PS5 behavior. - The updated hosted Windows build, which was pending when checked. - The reported title run independently. ## To get this to a good state Recapture both builds with the documented capture settings and no extra trace/profile switches, include the refreshed summary lines, traces, and digests, and confirm the digests no longer report dropped events if possible. I will recheck the updated report and hosted build on the new head.
MarcZX10 commented 2026-10-29 03:18:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T03:18:09Z.

Review: CHANGES_REQUESTED


Re-checked — changes requested

I reviewed the performance report at exact head fda3f6ca6c0cbf3370ecd5fb580312f707ecc082. The new main-versus-change pair fixes the commit-provenance problem from my prior review, and both published digest sections reproduce exactly. Two capture-form requirements remain unmet.

What I ran

On Linux, I downloaded the two trace assets linked by the PR and ran the trace_digest.py version from current main (3a2b91981651569163768854a1fcdc7193b6667b) with each matching summary line extracted from the PR description:

python3 tools/trace_digest.py aps5-trace-3a2b91981651-1495087.json.gz --summary main-summary.jsonl
python3 tools/trace_digest.py aps5-trace-fda3f6ca6c0c-1527350.json.gz --summary pr-summary.jsonl

I also checked the current performance-report form and hosted checks. I did not rebuild the project or rerun the game or unit tests.

Results

Check Result
Baseline/candidate provenance Summary lines identify clean main 3a2b91981651 and clean PR commit fda3f6ca6c0c
Capture match Both summaries report the same title, scene, machine, GPU, driver, resolution, and capture window; the reported environment difference is APS5_GUEST_AFFINITY
Trace integrity/digest Both traces report no dropped events; both independently generated digest outputs exactly match the PR's posted outputs
Trace attachment The two files are linked from a separate fork release; they are not attached to this PR as the form requests
Capture logging The PR says the launch script writes the log to a file, contrary to the form's instruction not to redirect it
Hosted checks Windows, conventions, labels, eligibility, and report pass; Linux and specialized jobs are skipped
Focused tests The description reports 56/56 guest_thread_host_affinity and guest_pthread* tests on the rebased head; I did not rerun them

Negative control

The main capture is the requested baseline: 28 presents and 282.4 ms frame-time p50. The candidate reports 32 presents and 250.1 ms p50. This review verifies the supplied trace and summary artifacts, not an independently repeated performance run.

Findings

Blocking

  • The traces are not attached to the PR. The current form asks for each aps5-trace-<commit>-<pid>.json.gz to be attached in its Traces field. The description instead links the assets from a separate fork release. Please attach both files to this PR.
  • The capture log was redirected. The form explicitly says not to redirect the log because it costs time, and the report says the launcher wrote it to a file for both captures. Please recapture without redirecting the log, then replace the affected summary lines, trace attachments, and digest output. If maintainers want to accept an exception, that decision should be recorded before treating this as a compliant performance report.

Non-blocking

  • The actual paired data is internally consistent: the exact trace digests match the posted output, and neither trace reports dropped events.
  • The hosted Linux and specialized checks were skipped; the Windows workflow passed. The reported focused test result is useful but was not independently rerun here.

Sources

Not verified

I did not build the PR, rerun its CTest targets, or reproduce the game captures. Linux and specialized hosted jobs were skipped.

To get this to a good state

Attach both traces directly to the PR and provide a fresh pair captured without log redirection, with matching summary lines and newly generated digests. Then I can recheck the report against the same requirements.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5692444405 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12544#pullrequestreview-5692444405). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T03:18:09Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes requested I reviewed the performance report at exact head `fda3f6ca6c0cbf3370ecd5fb580312f707ecc082`. The new main-versus-change pair fixes the commit-provenance problem from my prior review, and both published digest sections reproduce exactly. Two capture-form requirements remain unmet. ## What I ran On Linux, I downloaded the two trace assets linked by the PR and ran the `trace_digest.py` version from current `main` (`3a2b91981651569163768854a1fcdc7193b6667b`) with each matching summary line extracted from the PR description: ~~~sh python3 tools/trace_digest.py aps5-trace-3a2b91981651-1495087.json.gz --summary main-summary.jsonl python3 tools/trace_digest.py aps5-trace-fda3f6ca6c0c-1527350.json.gz --summary pr-summary.jsonl ~~~ I also checked the current performance-report form and hosted checks. I did not rebuild the project or rerun the game or unit tests. ## Results | Check | Result | |---|---| | Baseline/candidate provenance | Summary lines identify clean `main` `3a2b91981651` and clean PR commit `fda3f6ca6c0c` | | Capture match | Both summaries report the same title, scene, machine, GPU, driver, resolution, and capture window; the reported environment difference is `APS5_GUEST_AFFINITY` | | Trace integrity/digest | Both traces report no dropped events; both independently generated digest outputs exactly match the PR's posted outputs | | Trace attachment | The two files are linked from a separate fork release; they are not attached to this PR as the form requests | | Capture logging | The PR says the launch script writes the log to a file, contrary to the form's instruction not to redirect it | | Hosted checks | Windows, conventions, labels, eligibility, and report pass; Linux and specialized jobs are skipped | | Focused tests | The description reports 56/56 `guest_thread_host_affinity` and `guest_pthread*` tests on the rebased head; I did not rerun them | ## Negative control The main capture is the requested baseline: 28 presents and 282.4 ms frame-time p50. The candidate reports 32 presents and 250.1 ms p50. This review verifies the supplied trace and summary artifacts, not an independently repeated performance run. ## Findings ### Blocking - **The traces are not attached to the PR.** The current form asks for each `aps5-trace-<commit>-<pid>.json.gz` to be attached in its Traces field. The description instead links the assets from a separate fork release. Please attach both files to this PR. - **The capture log was redirected.** The form explicitly says not to redirect the log because it costs time, and the report says the launcher wrote it to a file for both captures. Please recapture without redirecting the log, then replace the affected summary lines, trace attachments, and digest output. If maintainers want to accept an exception, that decision should be recorded before treating this as a compliant performance report. ### Non-blocking - The actual paired data is internally consistent: the exact trace digests match the posted output, and neither trace reports dropped events. - The hosted Linux and specialized checks were skipped; the Windows workflow passed. The reported focused test result is useful but was not independently rerun here. ## Sources - [Performance capture form at current `main`](https://github.com/boykopovar/AnyPS5/blob/3a2b91981651569163768854a1fcdc7193b6667b/.github/ISSUE_TEMPLATE/performance.yml) - [PR report and summary lines at the reviewed head](https://github.com/boykopovar/AnyPS5/tree/fda3f6ca6c0cbf3370ecd5fb580312f707ecc082) - [Main trace asset](https://github.com/XairRrR/AnyPS5/releases/download/perf-12544-traces/aps5-trace-3a2b91981651-1495087.json.gz) - [Candidate trace asset](https://github.com/XairRrR/AnyPS5/releases/download/perf-12544-traces/aps5-trace-fda3f6ca6c0c-1527350.json.gz) - [`trace_digest.py` at the baseline commit](https://github.com/boykopovar/AnyPS5/blob/3a2b91981651569163768854a1fcdc7193b6667b/tools/trace_digest.py) ## Not verified I did not build the PR, rerun its CTest targets, or reproduce the game captures. Linux and specialized hosted jobs were skipped. ## To get this to a good state Attach both traces directly to the PR and provide a fresh pair captured without log redirection, with matching summary lines and newly generated digests. Then I can recheck the report against the same requirements.
MarcZX10 commented 2026-11-14 06:42:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T06:42:34Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this; the points below are optional.

What I ran

Reviewed head d2058add1c490bdb78e75677f27e1719f34657e2. I read the prepared description, commits, manifest, diff, and all four changed files listed as reviewed. I also read the relevant CpuTopology.hpp implementation. No commands or tests were run in this session; the test and performance results in the description are author-reported.

Results

Check Result Note
Changed code review passed Logic and targeted context inspected
Tests in this session not run Author-reported results not independently verified

Findings

Blocking

None.

Non-blocking

  • core/libs/tests/GuestThreadHostAffinity.cpp:23 limits the observed affinity to CPUs 0–63 and uses cpu_set_t. On Linux hosts with CPU IDs beyond that range, CurrentMask() omits allowed CPUs, so the test can incorrectly report that the guest thread's affinity differs from the requested mask. Consider using a dynamically sized CPU set, or explicitly constrain the test to representable CPUs.

Not verified

I did not run the build, tests, conventions check, or performance captures. The reported full-suite and focused test results, as well as the reported hardware performance measurements, are supplied by the author and were not independently checked. No files were excluded from review: all four changed files marked reviewed in the manifest were read; files.json was not available through the reader.

To get this to a good state

Nothing is required. The test portability point above is optional.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5902365612 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12544#pullrequestreview-5902365612). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T06:42:34Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this; the points below are optional. ## What I ran Reviewed head `d2058add1c490bdb78e75677f27e1719f34657e2`. I read the prepared description, commits, manifest, diff, and all four changed files listed as reviewed. I also read the relevant `CpuTopology.hpp` implementation. No commands or tests were run in this session; the test and performance results in the description are author-reported. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Logic and targeted context inspected | | Tests in this session | not run | Author-reported results not independently verified | ## Findings ### Blocking None. ### Non-blocking - `core/libs/tests/GuestThreadHostAffinity.cpp:23` limits the observed affinity to CPUs 0–63 and uses `cpu_set_t`. On Linux hosts with CPU IDs beyond that range, `CurrentMask()` omits allowed CPUs, so the test can incorrectly report that the guest thread's affinity differs from the requested mask. Consider using a dynamically sized CPU set, or explicitly constrain the test to representable CPUs. ## Not verified I did not run the build, tests, conventions check, or performance captures. The reported full-suite and focused test results, as well as the reported hardware performance measurements, are supplied by the author and were not independently checked. No files were excluded from review: all four changed files marked `reviewed` in the manifest were read; `files.json` was not available through the reader. ## To get this to a good state Nothing is required. The test portability point above is optional.
ligmaSec commented 2026-12-03 17:19:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T17:19:16Z.

Review: COMMENTED


I built and ran guest_thread_host_affinity with d2058add1c integrated into a Linux release build. The fixture passed with a process mask of 0xfff and an explicit guest mask of 0x800. It verified that both created guest threads ran on the selected CPU and that the creating host thread kept its original affinity. The host reported hybrid=0, so this run covers the explicit mask path.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6174806712 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12544#pullrequestreview-6174806712). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T17:19:16Z. **Review:** COMMENTED --- I built and ran `guest_thread_host_affinity` with `d2058add1c` integrated into a Linux release build. The fixture passed with a process mask of `0xfff` and an explicit guest mask of `0x800`. It verified that both created guest threads ran on the selected CPU and that the creating host thread kept its original affinity. The host reported `hybrid=0`, so this run covers the explicit mask path. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/12544:upstream-pr/12544'
git switch 'upstream-pr/12544'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/12544'
git switch 'upstream-pr/12544'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/12544'
git switch 'upstream-pr/12544'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/12544'
git switch 'main'
git merge --squash 'upstream-pr/12544'
git switch 'main'
git merge --ff-only 'upstream-pr/12544'
git switch 'main'
git merge 'upstream-pr/12544'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!12544
No description provided.