Give the recording thread a fast core and its sibling on Linux, and pick the thread that does the recording.

On Linux recorder_core reserved the last logical processor of the mask (an efficiency core on a hybrid
CPU) without its sibling, for the first thread to call vk_exec_record, and the first process-wide affinity
call took it back. plat_cpu_reserve there now takes the fast core that clocks highest with both of its
logical processors (none when fewer than four cores are fast), threads the holder starts get the other
processors, plat_process_affinity leaves the core with its holder, and a sweep every 300 presents moves
threads that inherited the core and gives it back once the holder has ended.

Shared code, so Windows changes too: the priority and the core go to the first thread that has spent half
a second in vk_exec_record (vk_exec.c rec_claim) instead of the first to call it, and the log names the
logical processors.

Pull request #358 by mooki000, taken as it is. The Windows files compile; nothing was run, and the Linux
code is not compiled here.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-10 06:20:40 -05:00
parent b2c5052ff5
commit f97358ddc4
7 changed files with 295 additions and 64 deletions

View File

@@ -62,8 +62,12 @@
# free_cores = 0
# Windows timer resolution of 1 ms for steadier frame pacing (0 = the Windows default).
# timer_1ms = 1
# The thread that records the GPU work keeps the highest scheduling priority (recorder_prio), and a core of its own that
# the process's other threads stay off (recorder_core: auto = with 12 or more logical processors, 1 always, 0 never).
# The thread that records the GPU work (the first to spend half a second doing it, not the one that submits first) keeps
# the highest scheduling priority (recorder_prio), and a core of its own that the process's other threads stay off
# (recorder_core: auto = with 12 or more logical processors, 1 always, 0 never). That is a fast core, with both of its
# logical processors: on Windows the highest-numbered core of the fastest efficiency class; on Linux the performance
# core that clocks highest on a hybrid CPU (else the core of the highest capacity or clock), and none when fewer than
# four cores are that fast. The log names the thread and its logical processors.
# recorder_prio = 1
# recorder_core = auto
# Submissions handed to the GPU queue together in one call, 1 to 16 (1 = each one at once).