Commit Graph
60 Commits
Author SHA1 Message Date
Adrià 9a9332a4bf Merge pull request #12085 from JJenkx/windows/jobmgr-spin-without-lock
fix(libSceJobManager): spin idle workers without taking the manager lock
2026-10-30 00:59:12 +01:00
XairRrR 5da36327d3 fix(libkernel): scale the reported TSC frequency under APS5_TIME_SCALE
Titles that execute rdtsc themselves ignored APS5_TIME_SCALE, because
only sceKernelReadTsc scaled its ticks. The reported TSC frequency is
now divided by the scale and sceKernelReadTsc returns raw ticks, so
ticks over the reported frequency follow the scale for both. The
JobManager worker spin keeps real time through the host frequency.

AI-assisted: yes
2026-10-28 18:47:46 +01:00
JJenkxandClaude Opus 5.5 f25e58c8cc fix(libSceJobManager): spin idle workers without taking the manager lock
A spinning or persistent worker unlocked and relocked the manager mutex
around every pause. Two such workers contend on that mutex all the time,
and on Windows the winpthreads mutex then puts them to sleep in the
kernel: in guest_job_manager_worker_count the two persistent workers used
125 ms and 0 ms of CPU in 2 s and the check failed. Workers now pause on
a work epoch that WakeWorkers, persistence changes and shutdown advance,
and retake the lock when it changes or after a bounded spin, so spinning
reacts to new work without contending on the mutex.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 15:46:45 -04:00
Felipebmaitan fcbca74068 fix(tests): register JobManager capacity with AGC tests 2026-10-25 13:56:59 -03:00
Felipebmaitan ac2c3970bc fix(job-manager): account for GPU barrier command capacity 2026-10-24 23:16:09 -03:00
Felipebmaitan b31ed5dc5b test(job-manager): refresh Linux reference on current prerequisites 2026-10-24 21:06:46 -03:00
Felipebmaitan 0d4025f98f fix(job-manager): refresh compute shutdown on public headers 2026-10-24 21:06:30 -03:00
Felipebmaitan 55efb35489 fix(job-manager): refresh GPU barriers with shared API types 2026-10-24 21:06:13 -03:00
Felipebmaitan 043c7de79a fix(job-manager): refresh profiler with shared API types 2026-10-24 21:05:57 -03:00
Felipebmaitan 8ab682946a fix(job-manager): refresh owned state on current prerequisites 2026-10-24 21:05:40 -03:00
Felipebmaitan 42bff60650 fix(job-manager): share registration imports and fixture types 2026-10-24 21:05:21 -03:00
Felipebmaitan 43efd58266 fix(job-manager): reconcile lifecycle with public headers 2026-10-24 21:05:08 -03:00
Felipebmaitan 2bed14cd6c fix(job-manager): refresh registration on reconciled lifecycle 2026-10-24 18:59:58 -03:00
Felipebmaitan c8cbf55d0e fix(job-manager): reconcile lifecycle with landed scheduler 2026-10-24 18:56:45 -03:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
boykopovar 35cf8d56cd refactor(sdk): add canonical headers for core libraries 2026-10-24 23:17:37 +03:00
Felipebmaitan 2758578c20 fix(job-manager): merge main into registration changes 2026-10-23 22:54:47 -03:00
Felipebmaitan 260c7816c0 fix(job-manager): merge main into lifecycle changes 2026-10-23 22:53:34 -03:00
Felipebmaitan b7640ae5a3 fix(job-manager): merge main and reconcile scheduler debt 2026-10-23 22:48:31 -03:00
Felipebmaitan a078f2a401 fix(job-manager): wake queued work before blocking caller-owned workers 2026-10-23 18:01:29 -03:00
Felipebmaitan 0b6b36f88f fix(job-manager): wake queued work before blocking caller-owned workers 2026-10-23 18:00:03 -03:00
Felipebmaitan 3ca817ed1b fix(job-manager): wake queued work before blocking caller-owned workers 2026-10-23 17:58:21 -03:00
Felipebmaitan c714feddc9 fix(job-manager): wake queued work before blocking caller-owned workers 2026-10-23 17:56:29 -03:00
Felipebmaitan 4e1e36d257 fix(job-manager): wake queued work before blocking caller-owned workers 2026-10-23 17:32:11 -03:00
Felipebmaitan dca749aaa0 fix(job-manager): wake runnable work before a worker waits 2026-10-23 17:27:22 -03:00
Felipebmaitan 0d7155f1fa test(job-manager): run original-module fixtures on Linux 2026-10-23 13:04:55 -03:00
Felipebmaitan 79c9c6f6c8 fix(job-manager): stop while submitted compute remains pending 2026-10-23 12:53:13 -03:00
Felipebmaitan d1d6e44d18 fix(job-manager): capture compute inputs across GPU barriers 2026-10-23 12:46:04 -03:00
Felipebmaitan f78334be68 fix(job-manager): preserve profiler spans across GPU barriers 2026-10-23 12:46:04 -03:00
Felipebmaitan 869bb77097 fix(job-manager): forward native profiler lifecycle events 2026-10-23 12:46:04 -03:00
Felipebmaitan f2dc168518 fix(job-manager): place scheduling state in the caller work area 2026-10-23 12:46:04 -03:00
Felipebmaitan c82f45c9c9 fix(job-manager): forward object registration results 2026-10-23 12:46:03 -03:00
Felipebmaitan f5d6081d3d fix(job-manager): retire ready waits during shutdown 2026-10-23 12:46:03 -03:00
Felipebmaitan f0a48e45f2 fix(job-manager): release waiters and clean up partial initialization 2026-10-23 12:46:03 -03:00
Felipebmaitan d6083b8c55 test(job-manager): verify native compute command capacity 2026-10-23 12:46:03 -03:00
Felipebmaitan 0393f72cb0 fix(libSceJobManager): batch compute completion in caller storage 2026-10-23 12:46:03 -03:00
Felipebmaitan 438540c8e1 fix(job-manager): spin only for pending work in host clock time 2026-10-23 12:46:03 -03:00
Felipebmaitan 5a19cd7e14 fix(libSceJobManager): honor worker spin and persistence policies 2026-10-23 12:46:02 -03:00
Felipebmaitan 2aecbef8b2 fix(job-manager): preserve profiler spans across GPU barriers 2026-10-23 12:19:21 -03:00
Felipebmaitan e8cf808ec7 fix(job-manager): forward native profiler lifecycle events 2026-10-23 12:07:56 -03:00
Felipebmaitan d14f5c0968 fix(job-manager): place scheduling state in the caller work area 2026-10-23 11:49:22 -03:00
Felipebmaitan ef1dd271c2 fix(job-manager): forward object registration results 2026-10-23 11:49:22 -03:00
Felipebmaitan b00038a9fb fix(job-manager): retire ready waits during shutdown 2026-10-23 11:49:21 -03:00
Felipebmaitan a207bde32f fix(job-manager): release waiters and clean up partial initialization 2026-10-23 11:49:21 -03:00
Felipebmaitan 27112a98eb test(job-manager): verify native compute command capacity 2026-10-23 11:49:21 -03:00
Felipebmaitan 4d41dc852c fix(libSceJobManager): batch compute completion in caller storage 2026-10-23 11:49:21 -03:00
Felipebmaitan ec00e6a5d4 fix(job-manager): spin only for pending work in host clock time 2026-10-23 11:49:21 -03:00
Felipebmaitan 87f9e424b9 fix(libSceJobManager): honor worker spin and persistence policies 2026-10-23 11:49:21 -03:00
Felipebmaitan aecbaf2da6 fix(job-manager): forward object registration results 2026-10-23 11:14:43 -03:00
Felipebmaitan 3346022cfd fix(job-manager): retire ready waits during shutdown 2026-10-23 11:14:38 -03:00