Run the game on the die with the larger L3 cache on processors whose dies differ (AMD's two-die X3D processors).

Windows places a game on the V-Cache die only when it recognizes the exe as a game, and it does not know this one, so the threads were spread over both dies by frequency preference. cache_die = 1 (the default) narrows the process to the logical processors that share the largest L3; it never widens the set the process was given, and does nothing where every L3 has the same size. The recorder's reserved core is then chosen inside that set.

Co-Authored-By: Claude Fable 5.2 <[EMAIL]>
This commit is contained in:
ordinarybob
2026-11-09 20:08:17 -06:00
committed by chrg6
parent c9942578e1
commit 662a6e88ee
8 changed files with 112 additions and 14 deletions

View File

@@ -41,6 +41,10 @@ uint64_t plat_thread_cpu_ns(uint32_t tid); // CPU time of the thread with id ti
// The logical processors the process may use (bit n = processor n, the first 64), into *all, and the lowest of each
// physical core among them into *first; returns the number of physical cores, 0 when unknown.
int plat_cpu_cores(uint64_t *all, uint64_t *first);
// The logical processors of the process's set (the first 64) that share the largest L3 cache, when the L3 caches
// are not all the same size: the die with AMD's 3D V-Cache on a two-die X3D processor. 0 when they are (one die, or
// equal dies) or the topology is unknown. *l3_kb: that cache's size.
uint64_t plat_cpu_cache_die(uint32_t *l3_kb);
int plat_process_affinity(uint64_t mask); // every thread of the process to the processors in mask; 1 on success
// Interrupting a thread (kernel.c's asynchronous preemption). A thread makes its own handle; another thread stops it