fix: reduce idle CPU wakeups and deferred-work polling
This commit is contained in:
1 parent
f7677ac3f1
commit
788b662d44
10 files changed
+109
-14
No files matched your search
@@ -1284,6 +1284,15 @@ namespace Sched {
|
||||
uint8_t* oldFpu = (oldSlot >= 0) ? processTable[oldSlot].fpuState : nullptr;
|
||||
uint8_t* newFpu = processTable[next].fpuState;
|
||||
|
||||
if (oldSlot < 0) {
|
||||
// AP idle loops mask their local periodic timer. Rearm it before
|
||||
// dispatching user work so preemption resumes with the process.
|
||||
// Also pick up a thermal-governor policy epoch that may have
|
||||
// changed while this CPU remained asleep without timer ticks.
|
||||
Hal::CpuPower::ApplyPolicyIfChanged();
|
||||
Timekeeping::ApicTimerLeaveApIdle();
|
||||
}
|
||||
|
||||
LoadUserFsBase(cpu, processTable[next].fsBase);
|
||||
|
||||
// DO NOT release schedLock here! It is held across the context
|
||||
|
||||
Reference in new issue
Block a user