Increase scheduler frequency.

This commit is contained in:
Drew Galbraith 2025-02-01 14:29:08 -08:00
parent 49c3ff8499
commit feb7c8e839
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@
#include "interrupt/apic.h"
#include "interrupt/timer.h"
const uint32_t kScheduleFrequency = 20;
const uint32_t kScheduleFrequency = 100;
ApicTimer* gApicTimer = nullptr;
void ApicTimer::Init() {

View File

@ -186,12 +186,12 @@ uint64_t cnt = 0;
extern "C" void isr_apic_timer();
extern "C" void interrupt_apic_timer(InterruptFrame*) {
cnt++;
if (cnt % 20 == 0) {
if (cnt % 100 == 0) {
if (cnt == 20) {
KernelHeap::DumpDebugData();
phys_mem::DumpPhysicalMemoryUsage();
}
dbgln("timer: {}s", cnt * 50 / 1000);
dbgln("timer: {}s", cnt * 10 / 1000);
}
gApic->SignalEOI();
gScheduler->Preempt();