diff --git a/sys/amd64/amd64/apic_vector.S b/sys/amd64/amd64/apic_vector.S index 5b90d0134278..3f0521f66941 100644 --- a/sys/amd64/amd64/apic_vector.S +++ b/sys/amd64/amd64/apic_vector.S @@ -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 diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index ceef075fb8ec..46a87a5a3790 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -42,9 +42,7 @@ #include #include #include -#ifdef BETTER_CLOCK #include -#endif #include /* cngetc() */ #include @@ -52,14 +50,12 @@ #include #include #include -#ifdef BETTER_CLOCK #include #include #include #ifdef GPROF #include #endif -#endif #include #include @@ -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) { diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c index ceef075fb8ec..46a87a5a3790 100644 --- a/sys/amd64/amd64/mptable.c +++ b/sys/amd64/amd64/mptable.c @@ -42,9 +42,7 @@ #include #include #include -#ifdef BETTER_CLOCK #include -#endif #include /* cngetc() */ #include @@ -52,14 +50,12 @@ #include #include #include -#ifdef BETTER_CLOCK #include #include #include #ifdef GPROF #include #endif -#endif #include #include @@ -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) { diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index ceef075fb8ec..46a87a5a3790 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -42,9 +42,7 @@ #include #include #include -#ifdef BETTER_CLOCK #include -#endif #include /* cngetc() */ #include @@ -52,14 +50,12 @@ #include #include #include -#ifdef BETTER_CLOCK #include #include #include #ifdef GPROF #include #endif -#endif #include #include @@ -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) { diff --git a/sys/amd64/include/smp.h b/sys/amd64/include/smp.h index 1698f2d3a5b6..9f9149edd24b 100644 --- a/sys/amd64/include/smp.h +++ b/sys/amd64/include/smp.h @@ -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 diff --git a/sys/amd64/isa/intr_machdep.h b/sys/amd64/isa/intr_machdep.h index 9f328e92467f..ed5843734d01 100644 --- a/sys/amd64/isa/intr_machdep.h +++ b/sys/amd64/isa/intr_machdep.h @@ -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" */ diff --git a/sys/i386/i386/apic_vector.s b/sys/i386/i386/apic_vector.s index 5b90d0134278..3f0521f66941 100644 --- a/sys/i386/i386/apic_vector.s +++ b/sys/i386/i386/apic_vector.s @@ -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 diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index ceef075fb8ec..46a87a5a3790 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -42,9 +42,7 @@ #include #include #include -#ifdef BETTER_CLOCK #include -#endif #include /* cngetc() */ #include @@ -52,14 +50,12 @@ #include #include #include -#ifdef BETTER_CLOCK #include #include #include #ifdef GPROF #include #endif -#endif #include #include @@ -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) { diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c index ceef075fb8ec..46a87a5a3790 100644 --- a/sys/i386/i386/mptable.c +++ b/sys/i386/i386/mptable.c @@ -42,9 +42,7 @@ #include #include #include -#ifdef BETTER_CLOCK #include -#endif #include /* cngetc() */ #include @@ -52,14 +50,12 @@ #include #include #include -#ifdef BETTER_CLOCK #include #include #include #ifdef GPROF #include #endif -#endif #include #include @@ -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) { diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h index ceef075fb8ec..46a87a5a3790 100644 --- a/sys/i386/include/mptable.h +++ b/sys/i386/include/mptable.h @@ -42,9 +42,7 @@ #include #include #include -#ifdef BETTER_CLOCK #include -#endif #include /* cngetc() */ #include @@ -52,14 +50,12 @@ #include #include #include -#ifdef BETTER_CLOCK #include #include #include #ifdef GPROF #include #endif -#endif #include #include @@ -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) { diff --git a/sys/i386/include/smp.h b/sys/i386/include/smp.h index 1698f2d3a5b6..9f9149edd24b 100644 --- a/sys/i386/include/smp.h +++ b/sys/i386/include/smp.h @@ -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 diff --git a/sys/i386/include/smptests.h b/sys/i386/include/smptests.h index c1a22419379c..d666148fd21b 100644 --- a/sys/i386/include/smptests.h +++ b/sys/i386/include/smptests.h @@ -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 diff --git a/sys/i386/isa/apic_vector.s b/sys/i386/isa/apic_vector.s index 5b90d0134278..3f0521f66941 100644 --- a/sys/i386/isa/apic_vector.s +++ b/sys/i386/isa/apic_vector.s @@ -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 diff --git a/sys/i386/isa/intr_machdep.h b/sys/i386/isa/intr_machdep.h index 9f328e92467f..ed5843734d01 100644 --- a/sys/i386/isa/intr_machdep.h +++ b/sys/i386/isa/intr_machdep.h @@ -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" */ diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c index ceef075fb8ec..46a87a5a3790 100644 --- a/sys/kern/subr_smp.c +++ b/sys/kern/subr_smp.c @@ -42,9 +42,7 @@ #include #include #include -#ifdef BETTER_CLOCK #include -#endif #include /* cngetc() */ #include @@ -52,14 +50,12 @@ #include #include #include -#ifdef BETTER_CLOCK #include #include #include #ifdef GPROF #include #endif -#endif #include #include @@ -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) { diff --git a/sys/sys/smp.h b/sys/sys/smp.h index 1698f2d3a5b6..9f9149edd24b 100644 --- a/sys/sys/smp.h +++ b/sys/sys/smp.h @@ -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