[Threading] Add thread priority mapping with timer-driven quantum decay
And default ignore_thread_priorities to false. Map Xenon's 0-31 priority range across all 5 host priority levels instead of collapsing 0-17 into kNormal. Use timer-driven quantum decay (~20ms period) matching Xenon's 60-quantum / 3-per-tick cycle to prevent starvation by gradually lowering effective priority for non-real-time threads (< 18), piggybacking on the existing 1ms timestamp timer.
This commit is contained in:
@@ -384,6 +384,7 @@ class KernelState {
|
||||
BitMap tls_bitmap_;
|
||||
uint32_t ke_timestamp_bundle_ptr_ = 0;
|
||||
std::unique_ptr<xe::threading::HighResolutionTimer> timestamp_timer_;
|
||||
uint32_t quantum_timer_counter_ = 0;
|
||||
cpu::backend::GuestTrampolineGroup kernel_trampoline_group_;
|
||||
// fixed address referenced by dashboards. Data is currently unknown
|
||||
uint32_t strange_hardcoded_page_ = 0x8E038634 & (~0xFFFF);
|
||||
|
||||
Reference in New Issue
Block a user