perf(libSceNetCtl): reuse host interface queries until Windows reports a change #9386

Merged
mehmetbayoglu merged 1 commit from upstream-pr/9386 into main 2026-10-23 01:01:28 +00:00
mehmetbayoglu commented 2026-10-21 20:07:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mehmetbayoglu on 2026-10-21T20:07:35Z.


What

On Windows, sceNetCtlGetInfo, sceNetCtlGetState, sceNetCtlGetStateV6, sceNetCtlCheckCallback, sceNetCtlGetIfStat and the DNS servers libSceNet reads called GetAdaptersAddresses on every call. It is slow (it goes through an RPC to the network service), and PPSA34501 (Call of Duty: Black Ops) calls sceNetCtlGetInfo often enough that this took about a fifth of one thread at the Kino der Toten spawn.

The answers are now kept per address family and for the IPv4 interface, and dropped when NotifyUnicastIpAddressChange, NotifyIpInterfaceChange or NotifyRouteChange2 reports a change, so unplugging a cable or switching networks is still seen. If the notifications cannot be registered, every call queries the host as before. Linux and macOS are unchanged. The debt entry records the one gap: a change of DNS servers alone is picked up only at the next address, interface or route change.

Tested

  • Windows 11 Pro, i7-13700K, NVIDIA RTX 4070 Ti, driver 617.42. Full libs build; ctest -R "net_ctl|netctl" passes (3 tests).
  • PPSA34501, launch through the Kino der Toten route, 70 s per run, APS5_TRACE_SUMMARY_EVERY=10 and APS5_SAMPLE_THREADS, three runs each in the order main, change, change, main, main, change. Same executable on both sides; only libSceNetCtl.prx differs in code.
  • CPU: the sampled threads spent a median 19.0 % of one thread inside IPHLPAPI.DLL on main (17.9, 20.3, 19.0) and 0.0 % with the change (all three runs).
  • Frame rate: unchanged within noise (title fps median 11.7 to 12.2 on main, 11.4 to 12.1 with the change). The GPU submission path, not this thread, limits the frame on this scene, so this is a CPU saving, not a frame rate gain.

Summary lines (interval 40 to 50 s, in Kino), main then the change:

{"commit":"7202f120d5b6","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"32768","APS5_DRAW_PIPELINE":"1","APS5_DRAW_SNAPSHOT_ENTRIES":"16384","APS5_PIPELINE_JOURNAL_ENTRIES":"1000000","APS5_PIPELINE_JOURNAL_MAX_MIB":"8192","APS5_PIPELINE_STORE_ENTRIES":"16384","APS5_PREBUILD_THREADS":"12","APS5_SAMPLE_THREADS":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 617.42","os":"Windows 10.0.26200","cpu":"13th Gen Intel(R) Core(TM) i7-13700K","cpu_threads":24,"memory_mib":32528,"title_id":"PPSA34501","title":"Call of Duty\u00c2\u00ae: Black Ops","content_version":"01.008.000","resolution":"1920x1080","window":{"spec":"summary_every 10","first_present":1128,"ms":10058.139},"interval_start_s":40.114,"interval_end_s":50.172,"presents":123,"frame_ms":{"p50":81.363,"p90":84.434,"p99":88.191,"max":93.578},"gpu_busy_ms_per_present":21.502,"worker_busy_pct":{"queue worker 0x0":95.371},"top_phases_ms_per_frame":{"Driver.Packet":77.933,"Driver.Packet.draw":64.856,"Driver.Draw":63.097,"Graphics.Draw":53.564,"Graphics.Draw.draw_and_resource_release":37.710,"Driver.Draw.shader_compile_and_link":34.689,"Shader.ResolveGraphicsStagesAbi":31.978,"Shader.ResolveAbi":28.147},"trace_dropped":false,"trace":""}
{"commit":"0a5001bdecae","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"32768","APS5_DRAW_PIPELINE":"1","APS5_DRAW_SNAPSHOT_ENTRIES":"16384","APS5_PIPELINE_JOURNAL_ENTRIES":"1000000","APS5_PIPELINE_JOURNAL_MAX_MIB":"8192","APS5_PIPELINE_STORE_ENTRIES":"16384","APS5_PREBUILD_THREADS":"12","APS5_SAMPLE_THREADS":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 617.42","os":"Windows 10.0.26200","cpu":"13th Gen Intel(R) Core(TM) i7-13700K","cpu_threads":24,"memory_mib":32528,"title_id":"PPSA34501","title":"Call of Duty\u00c2\u00ae: Black Ops","content_version":"01.008.000","resolution":"1920x1080","window":{"spec":"summary_every 10","first_present":1141,"ms":10008.133},"interval_start_s":40.064,"interval_end_s":50.072,"presents":122,"frame_ms":{"p50":81.658,"p90":84.707,"p99":88.761,"max":126.311},"gpu_busy_ms_per_present":22.800,"worker_busy_pct":{"queue worker 0x0":95.326},"top_phases_ms_per_frame":{"Driver.Packet":78.149,"Driver.Packet.draw":64.875,"Driver.Draw":63.142,"Graphics.Draw":53.372,"Graphics.Draw.draw_and_resource_release":37.693,"Driver.Draw.shader_compile_and_link":34.389,"Shader.ResolveGraphicsStagesAbi":32.189,"Shader.ResolveAbi":27.600},"trace_dropped":false,"trace":""}

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: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4957660548 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9386). Originally posted by [mehmetbayoglu](https://github.com/mehmetbayoglu) on 2026-10-21T20:07:35Z. --- ### What On Windows, `sceNetCtlGetInfo`, `sceNetCtlGetState`, `sceNetCtlGetStateV6`, `sceNetCtlCheckCallback`, `sceNetCtlGetIfStat` and the DNS servers libSceNet reads called `GetAdaptersAddresses` on every call. It is slow (it goes through an RPC to the network service), and PPSA34501 (Call of Duty: Black Ops) calls `sceNetCtlGetInfo` often enough that this took about a fifth of one thread at the Kino der Toten spawn. The answers are now kept per address family and for the IPv4 interface, and dropped when `NotifyUnicastIpAddressChange`, `NotifyIpInterfaceChange` or `NotifyRouteChange2` reports a change, so unplugging a cable or switching networks is still seen. If the notifications cannot be registered, every call queries the host as before. Linux and macOS are unchanged. The debt entry records the one gap: a change of DNS servers alone is picked up only at the next address, interface or route change. ### Tested - Windows 11 Pro, i7-13700K, NVIDIA RTX 4070 Ti, driver 617.42. Full libs build; `ctest -R "net_ctl|netctl"` passes (3 tests). - PPSA34501, launch through the Kino der Toten route, 70 s per run, `APS5_TRACE_SUMMARY_EVERY=10` and `APS5_SAMPLE_THREADS`, three runs each in the order main, change, change, main, main, change. Same executable on both sides; only `libSceNetCtl.prx` differs in code. - **CPU:** the sampled threads spent a median 19.0 % of one thread inside `IPHLPAPI.DLL` on `main` (17.9, 20.3, 19.0) and 0.0 % with the change (all three runs). - **Frame rate:** unchanged within noise (title fps median 11.7 to 12.2 on `main`, 11.4 to 12.1 with the change). The GPU submission path, not this thread, limits the frame on this scene, so this is a CPU saving, not a frame rate gain. Summary lines (interval 40 to 50 s, in Kino), `main` then the change: ``` {"commit":"7202f120d5b6","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"32768","APS5_DRAW_PIPELINE":"1","APS5_DRAW_SNAPSHOT_ENTRIES":"16384","APS5_PIPELINE_JOURNAL_ENTRIES":"1000000","APS5_PIPELINE_JOURNAL_MAX_MIB":"8192","APS5_PIPELINE_STORE_ENTRIES":"16384","APS5_PREBUILD_THREADS":"12","APS5_SAMPLE_THREADS":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 617.42","os":"Windows 10.0.26200","cpu":"13th Gen Intel(R) Core(TM) i7-13700K","cpu_threads":24,"memory_mib":32528,"title_id":"PPSA34501","title":"Call of Duty\u00c2\u00ae: Black Ops","content_version":"01.008.000","resolution":"1920x1080","window":{"spec":"summary_every 10","first_present":1128,"ms":10058.139},"interval_start_s":40.114,"interval_end_s":50.172,"presents":123,"frame_ms":{"p50":81.363,"p90":84.434,"p99":88.191,"max":93.578},"gpu_busy_ms_per_present":21.502,"worker_busy_pct":{"queue worker 0x0":95.371},"top_phases_ms_per_frame":{"Driver.Packet":77.933,"Driver.Packet.draw":64.856,"Driver.Draw":63.097,"Graphics.Draw":53.564,"Graphics.Draw.draw_and_resource_release":37.710,"Driver.Draw.shader_compile_and_link":34.689,"Shader.ResolveGraphicsStagesAbi":31.978,"Shader.ResolveAbi":28.147},"trace_dropped":false,"trace":""} {"commit":"0a5001bdecae","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"32768","APS5_DRAW_PIPELINE":"1","APS5_DRAW_SNAPSHOT_ENTRIES":"16384","APS5_PIPELINE_JOURNAL_ENTRIES":"1000000","APS5_PIPELINE_JOURNAL_MAX_MIB":"8192","APS5_PIPELINE_STORE_ENTRIES":"16384","APS5_PREBUILD_THREADS":"12","APS5_SAMPLE_THREADS":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 617.42","os":"Windows 10.0.26200","cpu":"13th Gen Intel(R) Core(TM) i7-13700K","cpu_threads":24,"memory_mib":32528,"title_id":"PPSA34501","title":"Call of Duty\u00c2\u00ae: Black Ops","content_version":"01.008.000","resolution":"1920x1080","window":{"spec":"summary_every 10","first_present":1141,"ms":10008.133},"interval_start_s":40.064,"interval_end_s":50.072,"presents":122,"frame_ms":{"p50":81.658,"p90":84.707,"p99":88.761,"max":126.311},"gpu_busy_ms_per_present":22.800,"worker_busy_pct":{"queue worker 0x0":95.326},"top_phases_ms_per_frame":{"Driver.Packet":78.149,"Driver.Packet.draw":64.875,"Driver.Draw":63.142,"Graphics.Draw":53.372,"Graphics.Draw.draw_and_resource_release":37.693,"Driver.Draw.shader_compile_and_link":34.389,"Shader.ResolveGraphicsStagesAbi":32.189,"Shader.ResolveAbi":27.600},"trace_dropped":false,"trace":""} ``` ### 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: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
mehmetbayoglu commented 2026-10-21 20:08:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mehmetbayoglu on 2026-10-21T20:08:07Z.


tools/trace_digest.py output for every run (PPSA34501, Kino der Toten route, 70 s, APS5_TRACE_SUMMARY_EVERY=10), in the order they ran. main is 7202f120d5, the change is 0a5001bdec.

run 2-main

7 intervals, 0.0 to 70.2 s, 1490 presents
NVIDIA GeForce RTX 4070 Ti, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit 7202f120d5

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-10 407 28.2 30.1 51.4 185.5 5.4 95 % Driver.Packet 23.3
2 10-20 383 29.9 31.5 34.6 35.3 6.9 97 % Driver.Packet 25.3
3 20-30 209 16.8 82.8 117.0 317.2 10.1 96 % Driver.Packet 46.3
4 30-40 125 79.8 82.1 94.8 119.0 21.4 95 % Driver.Packet 76.5
5 40-50 123 81.1 84.2 92.8 94.5 21.8 95 % Driver.Packet 77.8
6 50-60 122 82.0 84.3 88.2 88.7 21.2 95 % Driver.Packet 78.0
7 60-70 121 82.1 85.0 90.2 123.9 24.2 95 % Driver.Packet 78.7
run 3-change

7 intervals, 0.0 to 70.2 s, 1492 presents
NVIDIA GeForce RTX 4070 Ti, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit 0a5001bdecae

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-10 410 27.9 29.7 65.0 123.7 5.3 96 % Driver.Packet 23.5
2 10-20 391 29.2 30.6 32.1 38.2 6.7 97 % Driver.Packet 24.8
3 20-30 214 16.9 83.8 141.8 198.9 9.1 97 % Driver.Packet 45.2
4 30-40 123 81.0 84.7 93.2 94.3 16.5 95 % Driver.Packet 78.1
5 40-50 122 81.5 84.9 94.3 123.0 23.3 95 % Driver.Packet 78.5
6 50-60 120 82.6 87.0 93.4 95.9 23.3 95 % Driver.Packet 79.4
7 60-70 112 87.5 95.7 125.8 221.2 24.3 95 % Driver.Packet 84.7
run 4-change

7 intervals, 0.0 to 70.1 s, 1502 presents
NVIDIA GeForce RTX 4070 Ti, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit 0a5001bdecae

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-10 412 27.8 29.6 65.3 139.3 5.3 96 % Driver.Packet 23.4
2 10-20 390 29.5 31.1 32.5 33.3 6.5 97 % Driver.Packet 24.9
3 20-30 215 16.9 82.8 152.0 195.3 9.4 97 % Driver.Packet 44.9
4 30-40 124 80.4 84.2 91.7 92.4 20.9 95 % Driver.Packet 77.1
5 40-50 122 81.7 84.7 88.8 126.3 22.8 95 % Driver.Packet 78.1
6 50-60 119 83.1 92.1 95.9 96.0 22.6 95 % Driver.Packet 80.2
7 60-70 120 82.9 88.1 92.6 132.1 20.8 95 % Driver.Packet 79.8
run 5-main

7 intervals, 0.0 to 70.3 s, 1490 presents
NVIDIA GeForce RTX 4070 Ti, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit 7202f120d5

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-10 403 28.3 29.9 50.8 189.0 5.4 77 % Driver.Packet 19.2
2 10-20 387 29.7 31.3 34.8 37.7 6.7 97 % Driver.Packet 25.0
3 20-30 213 16.8 83.9 145.1 223.3 9.3 96 % Driver.Packet 44.9
4 30-40 125 79.9 83.2 93.5 117.1 20.8 95 % Driver.Packet 76.9
5 40-50 123 81.4 84.4 88.2 93.6 21.5 95 % Driver.Packet 77.9
6 50-60 122 81.7 84.6 92.1 125.3 20.5 95 % Driver.Packet 78.6
7 60-70 117 84.4 93.4 96.4 96.8 23.9 96 % Driver.Packet 82.3
run 6-main

7 intervals, 0.0 to 70.2 s, 1489 presents
NVIDIA GeForce RTX 4070 Ti, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit 7202f120d5

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-10 407 28.2 29.8 45.0 174.7 5.4 83 % Driver.Packet 20.3
2 10-20 393 29.4 30.8 32.5 37.5 6.5 97 % Driver.Packet 24.6
3 20-30 206 16.9 84.2 134.1 206.0 10.0 96 % Driver.Packet 46.9
4 30-40 124 80.3 83.2 92.4 118.5 21.1 95 % Driver.Packet 77.3
5 40-50 122 81.6 84.2 94.6 98.8 21.4 95 % Driver.Packet 78.4
6 50-60 121 82.8 86.0 87.8 88.1 22.6 95 % Driver.Packet 79.0
7 60-70 116 85.6 95.9 100.3 129.4 23.2 96 % Driver.Packet 83.1
run 7-change

7 intervals, 0.0 to 70.2 s, 1486 presents
NVIDIA GeForce RTX 4070 Ti, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit 0a5001bdecae

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-10 409 28.0 29.6 50.2 184.1 5.2 96 % Driver.Packet 23.4
2 10-20 389 29.3 30.9 32.6 34.0 6.5 97 % Driver.Packet 24.9
3 20-30 214 16.9 85.4 150.2 198.7 9.5 97 % Driver.Packet 45.5
4 30-40 121 82.8 86.0 89.7 89.9 21.6 96 % Driver.Packet 79.5
5 40-50 119 83.4 85.9 88.7 128.2 24.1 96 % Driver.Packet 80.2
6 50-60 119 83.6 87.0 91.8 93.7 23.4 96 % Driver.Packet 80.3
7 60-70 115 85.6 93.1 128.6 132.3 23.8 96 % Driver.Packet 83.3

Thread samples (APS5_SAMPLE_THREADS), IPHLPAPI.DLL inclusive samples summed over threads, as a share of one thread: main 17.9 %, 20.3 %, 19.0 %; change 0.0 % in all three runs.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6325438894 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9386#issuecomment-6325438894). Originally posted by [mehmetbayoglu](https://github.com/mehmetbayoglu) on 2026-10-21T20:08:07Z. --- `tools/trace_digest.py` output for every run (PPSA34501, Kino der Toten route, 70 s, `APS5_TRACE_SUMMARY_EVERY=10`), in the order they ran. `main` is 7202f120d5, the change is 0a5001bdec. <details><summary>run 2-main</summary> **7 intervals**, 0.0 to 70.2 s, 1490 presents NVIDIA GeForce RTX 4070 Ti, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit 7202f120d5b6 | # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase | |---|---|---|---|---|---|---|---|---|---| | 1 | 0-10 | 407 | 28.2 | 30.1 | 51.4 | 185.5 | 5.4 | 95 % | Driver.Packet 23.3 | | 2 | 10-20 | 383 | 29.9 | 31.5 | 34.6 | 35.3 | 6.9 | 97 % | Driver.Packet 25.3 | | 3 | 20-30 | 209 | 16.8 | 82.8 | 117.0 | 317.2 | 10.1 | 96 % | Driver.Packet 46.3 | | 4 | 30-40 | 125 | 79.8 | 82.1 | 94.8 | 119.0 | 21.4 | 95 % | Driver.Packet 76.5 | | 5 | 40-50 | 123 | 81.1 | 84.2 | 92.8 | 94.5 | 21.8 | 95 % | Driver.Packet 77.8 | | 6 | 50-60 | 122 | 82.0 | 84.3 | 88.2 | 88.7 | 21.2 | 95 % | Driver.Packet 78.0 | | 7 | 60-70 | 121 | 82.1 | 85.0 | 90.2 | 123.9 | 24.2 | 95 % | Driver.Packet 78.7 | </details> <details><summary>run 3-change</summary> **7 intervals**, 0.0 to 70.2 s, 1492 presents NVIDIA GeForce RTX 4070 Ti, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit 0a5001bdecae | # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase | |---|---|---|---|---|---|---|---|---|---| | 1 | 0-10 | 410 | 27.9 | 29.7 | 65.0 | 123.7 | 5.3 | 96 % | Driver.Packet 23.5 | | 2 | 10-20 | 391 | 29.2 | 30.6 | 32.1 | 38.2 | 6.7 | 97 % | Driver.Packet 24.8 | | 3 | 20-30 | 214 | 16.9 | 83.8 | 141.8 | 198.9 | 9.1 | 97 % | Driver.Packet 45.2 | | 4 | 30-40 | 123 | 81.0 | 84.7 | 93.2 | 94.3 | 16.5 | 95 % | Driver.Packet 78.1 | | 5 | 40-50 | 122 | 81.5 | 84.9 | 94.3 | 123.0 | 23.3 | 95 % | Driver.Packet 78.5 | | 6 | 50-60 | 120 | 82.6 | 87.0 | 93.4 | 95.9 | 23.3 | 95 % | Driver.Packet 79.4 | | 7 | 60-70 | 112 | 87.5 | 95.7 | 125.8 | 221.2 | 24.3 | 95 % | Driver.Packet 84.7 | </details> <details><summary>run 4-change</summary> **7 intervals**, 0.0 to 70.1 s, 1502 presents NVIDIA GeForce RTX 4070 Ti, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit 0a5001bdecae | # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase | |---|---|---|---|---|---|---|---|---|---| | 1 | 0-10 | 412 | 27.8 | 29.6 | 65.3 | 139.3 | 5.3 | 96 % | Driver.Packet 23.4 | | 2 | 10-20 | 390 | 29.5 | 31.1 | 32.5 | 33.3 | 6.5 | 97 % | Driver.Packet 24.9 | | 3 | 20-30 | 215 | 16.9 | 82.8 | 152.0 | 195.3 | 9.4 | 97 % | Driver.Packet 44.9 | | 4 | 30-40 | 124 | 80.4 | 84.2 | 91.7 | 92.4 | 20.9 | 95 % | Driver.Packet 77.1 | | 5 | 40-50 | 122 | 81.7 | 84.7 | 88.8 | 126.3 | 22.8 | 95 % | Driver.Packet 78.1 | | 6 | 50-60 | 119 | 83.1 | 92.1 | 95.9 | 96.0 | 22.6 | 95 % | Driver.Packet 80.2 | | 7 | 60-70 | 120 | 82.9 | 88.1 | 92.6 | 132.1 | 20.8 | 95 % | Driver.Packet 79.8 | </details> <details><summary>run 5-main</summary> **7 intervals**, 0.0 to 70.3 s, 1490 presents NVIDIA GeForce RTX 4070 Ti, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit 7202f120d5b6 | # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase | |---|---|---|---|---|---|---|---|---|---| | 1 | 0-10 | 403 | 28.3 | 29.9 | 50.8 | 189.0 | 5.4 | 77 % | Driver.Packet 19.2 | | 2 | 10-20 | 387 | 29.7 | 31.3 | 34.8 | 37.7 | 6.7 | 97 % | Driver.Packet 25.0 | | 3 | 20-30 | 213 | 16.8 | 83.9 | 145.1 | 223.3 | 9.3 | 96 % | Driver.Packet 44.9 | | 4 | 30-40 | 125 | 79.9 | 83.2 | 93.5 | 117.1 | 20.8 | 95 % | Driver.Packet 76.9 | | 5 | 40-50 | 123 | 81.4 | 84.4 | 88.2 | 93.6 | 21.5 | 95 % | Driver.Packet 77.9 | | 6 | 50-60 | 122 | 81.7 | 84.6 | 92.1 | 125.3 | 20.5 | 95 % | Driver.Packet 78.6 | | 7 | 60-70 | 117 | 84.4 | 93.4 | 96.4 | 96.8 | 23.9 | 96 % | Driver.Packet 82.3 | </details> <details><summary>run 6-main</summary> **7 intervals**, 0.0 to 70.2 s, 1489 presents NVIDIA GeForce RTX 4070 Ti, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit 7202f120d5b6 | # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase | |---|---|---|---|---|---|---|---|---|---| | 1 | 0-10 | 407 | 28.2 | 29.8 | 45.0 | 174.7 | 5.4 | 83 % | Driver.Packet 20.3 | | 2 | 10-20 | 393 | 29.4 | 30.8 | 32.5 | 37.5 | 6.5 | 97 % | Driver.Packet 24.6 | | 3 | 20-30 | 206 | 16.9 | 84.2 | 134.1 | 206.0 | 10.0 | 96 % | Driver.Packet 46.9 | | 4 | 30-40 | 124 | 80.3 | 83.2 | 92.4 | 118.5 | 21.1 | 95 % | Driver.Packet 77.3 | | 5 | 40-50 | 122 | 81.6 | 84.2 | 94.6 | 98.8 | 21.4 | 95 % | Driver.Packet 78.4 | | 6 | 50-60 | 121 | 82.8 | 86.0 | 87.8 | 88.1 | 22.6 | 95 % | Driver.Packet 79.0 | | 7 | 60-70 | 116 | 85.6 | 95.9 | 100.3 | 129.4 | 23.2 | 96 % | Driver.Packet 83.1 | </details> <details><summary>run 7-change</summary> **7 intervals**, 0.0 to 70.2 s, 1486 presents NVIDIA GeForce RTX 4070 Ti, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit 0a5001bdecae | # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase | |---|---|---|---|---|---|---|---|---|---| | 1 | 0-10 | 409 | 28.0 | 29.6 | 50.2 | 184.1 | 5.2 | 96 % | Driver.Packet 23.4 | | 2 | 10-20 | 389 | 29.3 | 30.9 | 32.6 | 34.0 | 6.5 | 97 % | Driver.Packet 24.9 | | 3 | 20-30 | 214 | 16.9 | 85.4 | 150.2 | 198.7 | 9.5 | 97 % | Driver.Packet 45.5 | | 4 | 30-40 | 121 | 82.8 | 86.0 | 89.7 | 89.9 | 21.6 | 96 % | Driver.Packet 79.5 | | 5 | 40-50 | 119 | 83.4 | 85.9 | 88.7 | 128.2 | 24.1 | 96 % | Driver.Packet 80.2 | | 6 | 50-60 | 119 | 83.6 | 87.0 | 91.8 | 93.7 | 23.4 | 96 % | Driver.Packet 80.3 | | 7 | 60-70 | 115 | 85.6 | 93.1 | 128.6 | 132.3 | 23.8 | 96 % | Driver.Packet 83.3 | </details> Thread samples (`APS5_SAMPLE_THREADS`), `IPHLPAPI.DLL` inclusive samples summed over threads, as a share of one thread: main 17.9 %, 20.3 %, 19.0 %; change 0.0 % in all three runs.
mehmetbayoglu commented 2026-10-21 23:59:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mehmetbayoglu on 2026-10-21T23:59:10Z.


Checked both:

  • #7201 (macOS port) adds the macOS routing-table lookup in libSceNetCtl/Export.cpp. This PR changes only the Windows path (the query is renamed and cached under #ifdef _WIN32; Linux and macOS still query the host directly), so the two do not implement the same thing. Whichever lands second may need a small rebase around FindHostIpv4Interface.
  • #6039 reorganizes the technical debt docs into per-library files; it touches docs/dev/debt/libSceNetCtl.md for other entries, not the host interface cache.

No dependency either way.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6329268580 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9386#issuecomment-6329268580). Originally posted by [mehmetbayoglu](https://github.com/mehmetbayoglu) on 2026-10-21T23:59:10Z. --- Checked both: - #7201 (macOS port) adds the macOS routing-table lookup in `libSceNetCtl/Export.cpp`. This PR changes only the Windows path (the query is renamed and cached under `#ifdef _WIN32`; Linux and macOS still query the host directly), so the two do not implement the same thing. Whichever lands second may need a small rebase around `FindHostIpv4Interface`. - #6039 reorganizes the technical debt docs into per-library files; it touches `docs/dev/debt/libSceNetCtl.md` for other entries, not the host interface cache. No dependency either way.
MarcZX10 commented 2026-10-22 06:22:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T06:22:24Z.

Review: COMMENTED


I reviewed the Windows cache path and the invalidation flow. The cache is guarded by a mutex, change notifications only advance an atomic generation, and each subsequent query refreshes cached address/interface state when that generation changes. If notification registration partially fails, the successful handles are cancelled and the code falls back to querying on every call, preserving correctness. The documented DNS-only invalidation gap matches the implementation.

I built guest_net_ctl_tests locally on Linux. The target compiled and linked; its runtime could not execute here because the host CPU lacks the PS5-required LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA extensions. The PR's Windows title A/B measurements and focused Windows CTest results are useful evidence; I did not reproduce them locally. Local conventions and git diff --check both pass.

Before merge, please refresh this head against current main (d6eafa54d0464258574fd2f71889754d05a5bc93; this branch is 481 commits behind). I confirmed the shared-file merge-tree with open #7201 has a real Export.cpp conflict in libSceNetCtl; the #7201 author’s note about resolving the nearby FindHostIpv4Interface change is relevant. The merge-tree with #6039 also reports a conflict in docs/dev/debt/libSceNetCtl.md, so preserve both debt entries when rebasing even though the topics differ. Both PRs remain open. The title-specific PPSA34501 performance evidence is clear and satisfies the current named-title intake direction.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5610042844 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9386#pullrequestreview-5610042844). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T06:22:24Z. **Review:** COMMENTED --- I reviewed the Windows cache path and the invalidation flow. The cache is guarded by a mutex, change notifications only advance an atomic generation, and each subsequent query refreshes cached address/interface state when that generation changes. If notification registration partially fails, the successful handles are cancelled and the code falls back to querying on every call, preserving correctness. The documented DNS-only invalidation gap matches the implementation. I built `guest_net_ctl_tests` locally on Linux. The target compiled and linked; its runtime could not execute here because the host CPU lacks the PS5-required LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA extensions. The PR's Windows title A/B measurements and focused Windows CTest results are useful evidence; I did not reproduce them locally. Local conventions and `git diff --check` both pass. Before merge, please refresh this head against current `main` (`d6eafa54d0464258574fd2f71889754d05a5bc93`; this branch is 481 commits behind). I confirmed the shared-file merge-tree with open #7201 has a real `Export.cpp` conflict in `libSceNetCtl`; the #7201 author’s note about resolving the nearby `FindHostIpv4Interface` change is relevant. The merge-tree with #6039 also reports a conflict in `docs/dev/debt/libSceNetCtl.md`, so preserve both debt entries when rebasing even though the topics differ. Both PRs remain open. The title-specific PPSA34501 performance evidence is clear and satisfies the current named-title intake direction.
mehmetbayoglu commented 2026-10-22 06:27:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mehmetbayoglu on 2026-10-22T06:27:21Z.


@MarcZX10 Thanks for the review. Refreshed: the branch is rebased onto current main (d6eafa54d0), now 3f698c1016. The rebase applied cleanly and the change is identical, so the measurements in the description (taken at 0a5001bdec) still describe this head. After the rebase I rebuilt the libraries and reran guest_net_ctl, guest_netctl_ap and guest_netctl_ap_dialog on Windows (all pass), plus the conventions check and git diff --check.

On #7201 and #6039: agreed, whichever lands second keeps both sides, the macOS routing-table lookup beside the cached Windows path in Export.cpp, and both debt entries in libSceNetCtl.md. I will do that rebase if this one is second.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6334308740 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9386#issuecomment-6334308740). Originally posted by [mehmetbayoglu](https://github.com/mehmetbayoglu) on 2026-10-22T06:27:21Z. --- @MarcZX10 Thanks for the review. Refreshed: the branch is rebased onto current `main` (`d6eafa54d0`), now 3f698c1016. The rebase applied cleanly and the change is identical, so the measurements in the description (taken at 0a5001bdec) still describe this head. After the rebase I rebuilt the libraries and reran `guest_net_ctl`, `guest_netctl_ap` and `guest_netctl_ap_dialog` on Windows (all pass), plus the conventions check and `git diff --check`. On #7201 and #6039: agreed, whichever lands second keeps both sides, the macOS routing-table lookup beside the cached Windows path in `Export.cpp`, and both debt entries in `libSceNetCtl.md`. I will do that rebase if this one is second.
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!9386
No description provided.