diff options
author | Peter Wemm <peter@FreeBSD.org> | 2005-03-11 22:12:38 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2005-03-11 22:12:38 +0000 |
commit | 9e647d96292be1ea40e5f8022e44b8207cca57bd (patch) | |
tree | 60afdf52ebbc3278e07d02175cc4a8c5848df1b4 /sys | |
parent | 0cd202bb093dc0d0bc01e7ac00571dbc9e305958 (diff) | |
download | src-9e647d96292be1ea40e5f8022e44b8207cca57bd.tar.gz src-9e647d96292be1ea40e5f8022e44b8207cca57bd.zip |
MFi386: reduce apic clock interrupt rate
Notes
Notes:
svn path=/head/; revision=143433
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/local_apic.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/sys/amd64/amd64/local_apic.c b/sys/amd64/amd64/local_apic.c index 9df2c459e117..ad2464868745 100644 --- a/sys/amd64/amd64/local_apic.c +++ b/sys/amd64/amd64/local_apic.c @@ -67,9 +67,9 @@ CTASSERT(APIC_TIMER_INT < APIC_LOCAL_INTS); CTASSERT(APIC_LOCAL_INTS == 240); CTASSERT(IPI_STOP < APIC_SPURIOUS_INT); -#define LAPIC_TIMER_HZ_DIVIDER 3 -#define LAPIC_TIMER_STATHZ_DIVIDER 23 -#define LAPIC_TIMER_PROFHZ_DIVIDER 2 +#define LAPIC_TIMER_HZ_DIVIDER 2 +#define LAPIC_TIMER_STATHZ_DIVIDER 15 +#define LAPIC_TIMER_PROFHZ_DIVIDER 3 /* * Support for local APICs. Local APICs manage interrupts on each @@ -131,8 +131,6 @@ static u_int32_t lapic_timer_divisors[] = { volatile lapic_t *lapic; static u_long lapic_timer_divisor, lapic_timer_period, lapic_timer_hz; -static u_long *lapic_virtual_hardclock, *lapic_virtual_statclock, - *lapic_virtual_profclock; static void lapic_enable(void); static void lapic_timer_enable_intr(void); @@ -370,9 +368,6 @@ lapic_setup_clock(void) stathz = lapic_timer_hz / LAPIC_TIMER_STATHZ_DIVIDER; profhz = lapic_timer_hz / LAPIC_TIMER_PROFHZ_DIVIDER; lapic_timer_period = value / lapic_timer_hz; - intrcnt_add("lapic: hardclock", &lapic_virtual_hardclock); - intrcnt_add("lapic: statclock", &lapic_virtual_statclock); - intrcnt_add("lapic: profclock", &lapic_virtual_profclock); /* * Start up the timer on the BSP. The APs will kick off their @@ -627,10 +622,9 @@ lapic_handle_timer(struct clockframe frame) la->la_hard_ticks += hz; if (la->la_hard_ticks >= lapic_timer_hz) { la->la_hard_ticks -= lapic_timer_hz; - if (PCPU_GET(cpuid) == 0) { - (*lapic_virtual_hardclock)++; + if (PCPU_GET(cpuid) == 0) hardclock(&frame); - } else + else hardclock_process(&frame); } @@ -638,8 +632,6 @@ lapic_handle_timer(struct clockframe frame) la->la_stat_ticks += stathz; if (la->la_stat_ticks >= lapic_timer_hz) { la->la_stat_ticks -= lapic_timer_hz; - if (PCPU_GET(cpuid) == 0) - (*lapic_virtual_statclock)++; statclock(&frame); } @@ -647,8 +639,6 @@ lapic_handle_timer(struct clockframe frame) la->la_prof_ticks += profhz; if (la->la_prof_ticks >= lapic_timer_hz) { la->la_prof_ticks -= lapic_timer_hz; - if (PCPU_GET(cpuid) == 0) - (*lapic_virtual_profclock)++; if (profprocs != 0) profclock(&frame); } |