Remove the BETTER_CLOCK #ifdef's. The code is on by default and is here

to stay for the foreseeable future.

OK'd by:	peter (the idea)
This commit is contained in:
John Baldwin 2001-04-10 21:34:13 +00:00
parent 6a0fa9a023
commit ca7ef17c08
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75393
16 changed files with 29 additions and 149 deletions

View File

@ -212,8 +212,6 @@ Xinvltlb:
iret
#ifdef BETTER_CLOCK
/*
* Executed by a CPU when it receives an Xcpucheckstate IPI from another CPU,
*
@ -271,7 +269,6 @@ Xcpucheckstate:
popl %eax
iret
#endif /* BETTER_CLOCK */
/*
* Executed by a CPU when it receives an Xcpuast IPI from another CPU,
@ -502,11 +499,9 @@ stopped_cpus:
started_cpus:
.long 0
#ifdef BETTER_CLOCK
.globl checkstate_probed_cpus
checkstate_probed_cpus:
.long 0
#endif /* BETTER_CLOCK */
.globl checkstate_need_ast
checkstate_need_ast:
.long 0

View File

@ -42,9 +42,7 @@
#include <sys/malloc.h>
#include <sys/memrange.h>
#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
#include <sys/cons.h> /* cngetc() */
#include <vm/vm.h>
@ -52,14 +50,12 @@
#include <vm/pmap.h>
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
#ifdef BETTER_CLOCK
#include <sys/lock.h>
#include <vm/vm_map.h>
#include <sys/user.h>
#ifdef GPROF
#include <sys/gmon.h>
#endif
#endif
#include <machine/smp.h>
#include <machine/apic.h>
@ -631,11 +627,9 @@ mp_enable(u_int boot_addr)
setidt(XINVLTLB_OFFSET, Xinvltlb,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#ifdef BETTER_CLOCK
/* install an inter-CPU IPI for reading processor state */
setidt(XCPUCHECKSTATE_OFFSET, Xcpucheckstate,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#endif
/* install an inter-CPU IPI for all-CPU rendezvous */
setidt(XRENDEZVOUS_OFFSET, Xrendezvous,
@ -2338,8 +2332,6 @@ ap_init(void)
panic("scheduler returned us to ap_init");
}
#ifdef BETTER_CLOCK
#define CHECKSTATE_USER 0
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
@ -2505,7 +2497,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2534,7 +2526,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2581,7 +2573,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2628,7 +2620,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2638,8 +2630,6 @@ forward_hardclock(int pscnt)
}
}
#endif /* BETTER_CLOCK */
void
forward_signal(struct proc *p)
{

View File

@ -42,9 +42,7 @@
#include <sys/malloc.h>
#include <sys/memrange.h>
#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
#include <sys/cons.h> /* cngetc() */
#include <vm/vm.h>
@ -52,14 +50,12 @@
#include <vm/pmap.h>
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
#ifdef BETTER_CLOCK
#include <sys/lock.h>
#include <vm/vm_map.h>
#include <sys/user.h>
#ifdef GPROF
#include <sys/gmon.h>
#endif
#endif
#include <machine/smp.h>
#include <machine/apic.h>
@ -631,11 +627,9 @@ mp_enable(u_int boot_addr)
setidt(XINVLTLB_OFFSET, Xinvltlb,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#ifdef BETTER_CLOCK
/* install an inter-CPU IPI for reading processor state */
setidt(XCPUCHECKSTATE_OFFSET, Xcpucheckstate,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#endif
/* install an inter-CPU IPI for all-CPU rendezvous */
setidt(XRENDEZVOUS_OFFSET, Xrendezvous,
@ -2338,8 +2332,6 @@ ap_init(void)
panic("scheduler returned us to ap_init");
}
#ifdef BETTER_CLOCK
#define CHECKSTATE_USER 0
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
@ -2505,7 +2497,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2534,7 +2526,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2581,7 +2573,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2628,7 +2620,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2638,8 +2630,6 @@ forward_hardclock(int pscnt)
}
}
#endif /* BETTER_CLOCK */
void
forward_signal(struct proc *p)
{

View File

@ -42,9 +42,7 @@
#include <sys/malloc.h>
#include <sys/memrange.h>
#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
#include <sys/cons.h> /* cngetc() */
#include <vm/vm.h>
@ -52,14 +50,12 @@
#include <vm/pmap.h>
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
#ifdef BETTER_CLOCK
#include <sys/lock.h>
#include <vm/vm_map.h>
#include <sys/user.h>
#ifdef GPROF
#include <sys/gmon.h>
#endif
#endif
#include <machine/smp.h>
#include <machine/apic.h>
@ -631,11 +627,9 @@ mp_enable(u_int boot_addr)
setidt(XINVLTLB_OFFSET, Xinvltlb,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#ifdef BETTER_CLOCK
/* install an inter-CPU IPI for reading processor state */
setidt(XCPUCHECKSTATE_OFFSET, Xcpucheckstate,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#endif
/* install an inter-CPU IPI for all-CPU rendezvous */
setidt(XRENDEZVOUS_OFFSET, Xrendezvous,
@ -2338,8 +2332,6 @@ ap_init(void)
panic("scheduler returned us to ap_init");
}
#ifdef BETTER_CLOCK
#define CHECKSTATE_USER 0
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
@ -2505,7 +2497,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2534,7 +2526,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2581,7 +2573,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2628,7 +2620,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2638,8 +2630,6 @@ forward_hardclock(int pscnt)
}
}
#endif /* BETTER_CLOCK */
void
forward_signal(struct proc *p)
{

View File

@ -109,10 +109,8 @@ void init_secondary __P((void));
void smp_invltlb __P((void));
int stop_cpus __P((u_int));
int restart_cpus __P((u_int));
#ifdef BETTER_CLOCK
void forward_statclock __P((int pscnt));
void forward_hardclock __P((int pscnt));
#endif /* BETTER_CLOCK */
void forward_signal __P((struct proc *));
void forward_roundrobin __P((void));
#ifdef APIC_INTR_REORDER

View File

@ -106,10 +106,8 @@
/* TLB shootdowns */
#define XINVLTLB_OFFSET (ICU_OFFSET + 112)
#ifdef BETTER_CLOCK
/* inter-cpu clock handling */
#define XCPUCHECKSTATE_OFFSET (ICU_OFFSET + 113)
#endif
/* inter-CPU rendezvous */
#define XRENDEZVOUS_OFFSET (ICU_OFFSET + 114)
@ -175,9 +173,7 @@ inthand_t
inthand_t
Xinvltlb, /* TLB shootdowns */
#ifdef BETTER_CLOCK
Xcpucheckstate, /* Check cpu state */
#endif
Xcpuast, /* Additional software trap on other cpu */
Xcpustop, /* CPU stops & waits for another CPU to restart it */
Xspuriousint, /* handle APIC "spurious INTs" */

View File

@ -212,8 +212,6 @@ Xinvltlb:
iret
#ifdef BETTER_CLOCK
/*
* Executed by a CPU when it receives an Xcpucheckstate IPI from another CPU,
*
@ -271,7 +269,6 @@ Xcpucheckstate:
popl %eax
iret
#endif /* BETTER_CLOCK */
/*
* Executed by a CPU when it receives an Xcpuast IPI from another CPU,
@ -502,11 +499,9 @@ stopped_cpus:
started_cpus:
.long 0
#ifdef BETTER_CLOCK
.globl checkstate_probed_cpus
checkstate_probed_cpus:
.long 0
#endif /* BETTER_CLOCK */
.globl checkstate_need_ast
checkstate_need_ast:
.long 0

View File

@ -42,9 +42,7 @@
#include <sys/malloc.h>
#include <sys/memrange.h>
#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
#include <sys/cons.h> /* cngetc() */
#include <vm/vm.h>
@ -52,14 +50,12 @@
#include <vm/pmap.h>
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
#ifdef BETTER_CLOCK
#include <sys/lock.h>
#include <vm/vm_map.h>
#include <sys/user.h>
#ifdef GPROF
#include <sys/gmon.h>
#endif
#endif
#include <machine/smp.h>
#include <machine/apic.h>
@ -631,11 +627,9 @@ mp_enable(u_int boot_addr)
setidt(XINVLTLB_OFFSET, Xinvltlb,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#ifdef BETTER_CLOCK
/* install an inter-CPU IPI for reading processor state */
setidt(XCPUCHECKSTATE_OFFSET, Xcpucheckstate,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#endif
/* install an inter-CPU IPI for all-CPU rendezvous */
setidt(XRENDEZVOUS_OFFSET, Xrendezvous,
@ -2338,8 +2332,6 @@ ap_init(void)
panic("scheduler returned us to ap_init");
}
#ifdef BETTER_CLOCK
#define CHECKSTATE_USER 0
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
@ -2505,7 +2497,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2534,7 +2526,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2581,7 +2573,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2628,7 +2620,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2638,8 +2630,6 @@ forward_hardclock(int pscnt)
}
}
#endif /* BETTER_CLOCK */
void
forward_signal(struct proc *p)
{

View File

@ -42,9 +42,7 @@
#include <sys/malloc.h>
#include <sys/memrange.h>
#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
#include <sys/cons.h> /* cngetc() */
#include <vm/vm.h>
@ -52,14 +50,12 @@
#include <vm/pmap.h>
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
#ifdef BETTER_CLOCK
#include <sys/lock.h>
#include <vm/vm_map.h>
#include <sys/user.h>
#ifdef GPROF
#include <sys/gmon.h>
#endif
#endif
#include <machine/smp.h>
#include <machine/apic.h>
@ -631,11 +627,9 @@ mp_enable(u_int boot_addr)
setidt(XINVLTLB_OFFSET, Xinvltlb,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#ifdef BETTER_CLOCK
/* install an inter-CPU IPI for reading processor state */
setidt(XCPUCHECKSTATE_OFFSET, Xcpucheckstate,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#endif
/* install an inter-CPU IPI for all-CPU rendezvous */
setidt(XRENDEZVOUS_OFFSET, Xrendezvous,
@ -2338,8 +2332,6 @@ ap_init(void)
panic("scheduler returned us to ap_init");
}
#ifdef BETTER_CLOCK
#define CHECKSTATE_USER 0
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
@ -2505,7 +2497,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2534,7 +2526,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2581,7 +2573,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2628,7 +2620,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2638,8 +2630,6 @@ forward_hardclock(int pscnt)
}
}
#endif /* BETTER_CLOCK */
void
forward_signal(struct proc *p)
{

View File

@ -42,9 +42,7 @@
#include <sys/malloc.h>
#include <sys/memrange.h>
#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
#include <sys/cons.h> /* cngetc() */
#include <vm/vm.h>
@ -52,14 +50,12 @@
#include <vm/pmap.h>
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
#ifdef BETTER_CLOCK
#include <sys/lock.h>
#include <vm/vm_map.h>
#include <sys/user.h>
#ifdef GPROF
#include <sys/gmon.h>
#endif
#endif
#include <machine/smp.h>
#include <machine/apic.h>
@ -631,11 +627,9 @@ mp_enable(u_int boot_addr)
setidt(XINVLTLB_OFFSET, Xinvltlb,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#ifdef BETTER_CLOCK
/* install an inter-CPU IPI for reading processor state */
setidt(XCPUCHECKSTATE_OFFSET, Xcpucheckstate,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#endif
/* install an inter-CPU IPI for all-CPU rendezvous */
setidt(XRENDEZVOUS_OFFSET, Xrendezvous,
@ -2338,8 +2332,6 @@ ap_init(void)
panic("scheduler returned us to ap_init");
}
#ifdef BETTER_CLOCK
#define CHECKSTATE_USER 0
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
@ -2505,7 +2497,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2534,7 +2526,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2581,7 +2573,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2628,7 +2620,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2638,8 +2630,6 @@ forward_hardclock(int pscnt)
}
}
#endif /* BETTER_CLOCK */
void
forward_signal(struct proc *p)
{

View File

@ -109,10 +109,8 @@ void init_secondary __P((void));
void smp_invltlb __P((void));
int stop_cpus __P((u_int));
int restart_cpus __P((u_int));
#ifdef BETTER_CLOCK
void forward_statclock __P((int pscnt));
void forward_hardclock __P((int pscnt));
#endif /* BETTER_CLOCK */
void forward_signal __P((struct proc *));
void forward_roundrobin __P((void));
#ifdef APIC_INTR_REORDER

View File

@ -34,27 +34,6 @@
*/
/*
* Tor's clock improvements.
*
* When the giant kernel lock disappears, a different strategy should
* probably be used, thus this patch can only be considered a temporary
* measure.
*
* This patch causes (NCPU-1)*(128+100) extra IPIs per second.
* During profiling, the number is (NCPU-1)*(1024+100) extra IPIs/s
* in addition to extra IPIs due to forwarding ASTs to other CPUs.
*
* Having a shared AST flag in an SMP configuration is wrong, and I've
* just kludged around it, based upon the kernel lock blocking other
* processors from entering the kernel while handling an AST for one
* processor. When the giant kernel lock disappers, this kludge breaks.
*
* -- Tor
*/
#define BETTER_CLOCK
/*
* Control the "giant lock" pushdown by logical steps.
*/
@ -92,8 +71,8 @@
/*
* Send CPUSTOP IPI for stop/restart of other CPUs on DDB break.
*/
#define VERBOSE_CPUSTOP_ON_DDBBREAK
*/
#define CPUSTOP_ON_DDBBREAK

View File

@ -212,8 +212,6 @@ Xinvltlb:
iret
#ifdef BETTER_CLOCK
/*
* Executed by a CPU when it receives an Xcpucheckstate IPI from another CPU,
*
@ -271,7 +269,6 @@ Xcpucheckstate:
popl %eax
iret
#endif /* BETTER_CLOCK */
/*
* Executed by a CPU when it receives an Xcpuast IPI from another CPU,
@ -502,11 +499,9 @@ stopped_cpus:
started_cpus:
.long 0
#ifdef BETTER_CLOCK
.globl checkstate_probed_cpus
checkstate_probed_cpus:
.long 0
#endif /* BETTER_CLOCK */
.globl checkstate_need_ast
checkstate_need_ast:
.long 0

View File

@ -106,10 +106,8 @@
/* TLB shootdowns */
#define XINVLTLB_OFFSET (ICU_OFFSET + 112)
#ifdef BETTER_CLOCK
/* inter-cpu clock handling */
#define XCPUCHECKSTATE_OFFSET (ICU_OFFSET + 113)
#endif
/* inter-CPU rendezvous */
#define XRENDEZVOUS_OFFSET (ICU_OFFSET + 114)
@ -175,9 +173,7 @@ inthand_t
inthand_t
Xinvltlb, /* TLB shootdowns */
#ifdef BETTER_CLOCK
Xcpucheckstate, /* Check cpu state */
#endif
Xcpuast, /* Additional software trap on other cpu */
Xcpustop, /* CPU stops & waits for another CPU to restart it */
Xspuriousint, /* handle APIC "spurious INTs" */

View File

@ -42,9 +42,7 @@
#include <sys/malloc.h>
#include <sys/memrange.h>
#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
#include <sys/cons.h> /* cngetc() */
#include <vm/vm.h>
@ -52,14 +50,12 @@
#include <vm/pmap.h>
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
#ifdef BETTER_CLOCK
#include <sys/lock.h>
#include <vm/vm_map.h>
#include <sys/user.h>
#ifdef GPROF
#include <sys/gmon.h>
#endif
#endif
#include <machine/smp.h>
#include <machine/apic.h>
@ -631,11 +627,9 @@ mp_enable(u_int boot_addr)
setidt(XINVLTLB_OFFSET, Xinvltlb,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#ifdef BETTER_CLOCK
/* install an inter-CPU IPI for reading processor state */
setidt(XCPUCHECKSTATE_OFFSET, Xcpucheckstate,
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#endif
/* install an inter-CPU IPI for all-CPU rendezvous */
setidt(XRENDEZVOUS_OFFSET, Xrendezvous,
@ -2338,8 +2332,6 @@ ap_init(void)
panic("scheduler returned us to ap_init");
}
#ifdef BETTER_CLOCK
#define CHECKSTATE_USER 0
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
@ -2505,7 +2497,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2534,7 +2526,7 @@ forward_statclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_statclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2581,7 +2573,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i == 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: checkstate %x\n",
checkstate_probed_cpus);
#endif
@ -2628,7 +2620,7 @@ forward_hardclock(int pscnt)
/* spin */
i++;
if (i > 100000) {
#ifdef BETTER_CLOCK_DIAGNOSTIC
#ifdef DIAGNOSTIC
printf("forward_hardclock: dropped ast 0x%x\n",
checkstate_need_ast & map);
#endif
@ -2638,8 +2630,6 @@ forward_hardclock(int pscnt)
}
}
#endif /* BETTER_CLOCK */
void
forward_signal(struct proc *p)
{

View File

@ -109,10 +109,8 @@ void init_secondary __P((void));
void smp_invltlb __P((void));
int stop_cpus __P((u_int));
int restart_cpus __P((u_int));
#ifdef BETTER_CLOCK
void forward_statclock __P((int pscnt));
void forward_hardclock __P((int pscnt));
#endif /* BETTER_CLOCK */
void forward_signal __P((struct proc *));
void forward_roundrobin __P((void));
#ifdef APIC_INTR_REORDER