diff options
author | jhb <jhb@FreeBSD.org> | 2001-04-10 21:34:13 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-04-10 21:34:13 +0000 |
commit | ee034b0be21d76a493ce0170922a2953a43bff4a (patch) | |
tree | 4bb575ed7053b014b0f1d44a23a5563fb0f3cf83 | |
parent | 7df3e254964ecc5ad934c334cc5366d9e4e20a4b (diff) | |
download | FreeBSD-src-ee034b0be21d76a493ce0170922a2953a43bff4a.zip FreeBSD-src-ee034b0be21d76a493ce0170922a2953a43bff4a.tar.gz |
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)
-rw-r--r-- | sys/amd64/amd64/apic_vector.S | 5 | ||||
-rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 18 | ||||
-rw-r--r-- | sys/amd64/amd64/mptable.c | 18 | ||||
-rw-r--r-- | sys/amd64/include/mptable.h | 18 | ||||
-rw-r--r-- | sys/amd64/include/smp.h | 2 | ||||
-rw-r--r-- | sys/amd64/isa/intr_machdep.h | 4 | ||||
-rw-r--r-- | sys/i386/i386/apic_vector.s | 5 | ||||
-rw-r--r-- | sys/i386/i386/mp_machdep.c | 18 | ||||
-rw-r--r-- | sys/i386/i386/mptable.c | 18 | ||||
-rw-r--r-- | sys/i386/include/mptable.h | 18 | ||||
-rw-r--r-- | sys/i386/include/smp.h | 2 | ||||
-rw-r--r-- | sys/i386/include/smptests.h | 23 | ||||
-rw-r--r-- | sys/i386/isa/apic_vector.s | 5 | ||||
-rw-r--r-- | sys/i386/isa/intr_machdep.h | 4 | ||||
-rw-r--r-- | sys/kern/subr_smp.c | 18 | ||||
-rw-r--r-- | sys/sys/smp.h | 2 |
16 files changed, 29 insertions, 149 deletions
diff --git a/sys/amd64/amd64/apic_vector.S b/sys/amd64/amd64/apic_vector.S index 5b90d01..3f0521f 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 ceef075..46a87a5 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -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) { diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c index ceef075..46a87a5 100644 --- a/sys/amd64/amd64/mptable.c +++ b/sys/amd64/amd64/mptable.c @@ -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) { diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index ceef075..46a87a5 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -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) { diff --git a/sys/amd64/include/smp.h b/sys/amd64/include/smp.h index 1698f2d..9f9149e 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 9f328e9..ed58437 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 5b90d01..3f0521f 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 ceef075..46a87a5 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -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) { diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c index ceef075..46a87a5 100644 --- a/sys/i386/i386/mptable.c +++ b/sys/i386/i386/mptable.c @@ -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) { diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h index ceef075..46a87a5 100644 --- a/sys/i386/include/mptable.h +++ b/sys/i386/include/mptable.h @@ -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) { diff --git a/sys/i386/include/smp.h b/sys/i386/include/smp.h index 1698f2d..9f9149e 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 c1a22419..d666148 100644 --- a/sys/i386/include/smptests.h +++ b/sys/i386/include/smptests.h @@ -35,27 +35,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. */ #define PUSHDOWN_LEVEL_1 @@ -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 5b90d01..3f0521f 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 9f328e9..ed58437 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 ceef075..46a87a5 100644 --- a/sys/kern/subr_smp.c +++ b/sys/kern/subr_smp.c @@ -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) { diff --git a/sys/sys/smp.h b/sys/sys/smp.h index 1698f2d..9f9149e 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 |