mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 15:19:58 -04:00
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:
@@ -207,7 +207,7 @@ static const CfgMeta metas[] = {
|
||||
// dynamic resolution (dynres.c): the scene follows the GPU time toward DYN_RES_TARGET milliseconds
|
||||
{"DYN_RES", "0", "0|1", LIVE}, {"DYN_RES_TARGET", "16.7", "1..100", LIVE}, {"DYN_RES_STEP", "45", "8..600", LIVE},
|
||||
// the recording thread: a core of its own (auto: with 12 or more logical processors) and the highest priority
|
||||
// (vk_exec.c vk_exec_record)
|
||||
// (vk_exec.c rec_claim)
|
||||
{"RECORDER_CORE", "auto", "auto|0|1", RESTART}, {"RECORDER_PRIO", "1", "0|1", RESTART}, {"REPLAY_TIME", "0", "0|1", RESTART}, {"LOCK_TIME", "0", "0|1", RESTART}, {"POOL_CREATE_BUDGET", "16", "1..4096", RESTART}, {"POOL_CREATE_MS", "6", "0..100", RESTART},
|
||||
// held submissions handed to the queue together (vk_sync.c, submit batching)
|
||||
{"SUBMIT_BATCH", "4", "1..16", RESTART},
|
||||
|
||||
Reference in New Issue
Block a user