Increase scheduler frequency.
This commit is contained in:
parent
49c3ff8499
commit
feb7c8e839
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue