From owner-cvs-all Fri Apr 27 12:28:34 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 70F9F37B43C; Fri, 27 Apr 2001 12:28:26 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f3RJSQ764773; Fri, 27 Apr 2001 12:28:26 -0700 (PDT) (envelope-from jhb) Message-Id: <200104271928.f3RJSQ764773@freefall.freebsd.org> From: John Baldwin Date: Fri, 27 Apr 2001 12:28:26 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/alpha/alpha db_interface.c interrupt.c machdep.c mp_machdep.c pmap.c trap.c src/sys/alpha/include cpu.h globaldata.h ipl.h smp.h src/sys/conf files files.ia64 src/sys/i386/i386 db_interface.c i686_mem.c machdep.c mp_machdep.c ... X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG jhb 2001/04/27 12:28:26 PDT Modified files: sys/alpha/alpha db_interface.c interrupt.c machdep.c mp_machdep.c pmap.c trap.c sys/alpha/include cpu.h globaldata.h ipl.h smp.h sys/conf files files.ia64 sys/i386/i386 db_interface.c i686_mem.c machdep.c mp_machdep.c sys_machdep.c trap.c vm_machdep.c sys/i386/include cpu.h globaldata.h ipl.h smp.h sys/i386/isa apic_vector.s clock.c intr_machdep.h sys/ia64/ia64 db_interface.c machdep.c mp_machdep.c trap.c sys/ia64/include cpu.h globaldata.h ipl.h smp.h sys/kern kern_clock.c kern_idle.c kern_intr.c kern_mib.c kern_shutdown.c kern_sig.c kern_synch.c subr_smp.c sys/pc98/i386 machdep.c sys/posix4 ksched.c sys/powerpc/powerpc mp_machdep.c sys/sys proc.h smp.h systm.h Log: Overhaul of the SMP code. Several portions of the SMP kernel support have been made machine independent and various other adjustments have been made to support Alpha SMP. - It splits the per-process portions of hardclock() and statclock() off into hardclock_process() and statclock_process() respectively. hardclock() and statclock() call the *_process() functions for the current process so that UP systems will run as before. For SMP systems, it is simply necessary to ensure that all other processors execute the *_process() functions when the main clock functions are triggered on one CPU by an interrupt. For the alpha 4100, clock interrupts are delievered in a staggered broadcast fashion, so we simply call hardclock/statclock on the boot CPU and call the *_process() functions on the secondaries. For x86, we call statclock and hardclock as usual and then call forward_hardclock/statclock in the MD code to send an IPI to cause the AP's to execute forwared_hardclock/statclock which then call the *_process() functions. - forward_signal() and forward_roundrobin() have been reworked to be MI and to involve less hackery. Now the cpu doing the forward sets any flags, etc. and sends a very simple IPI_AST to the other cpu(s). AST IPIs now just basically return so that they can execute ast() and don't bother with setting the astpending or needresched flags themselves. This also removes the loop in forward_signal() as sched_lock closes the race condition that the loop worked around. - need_resched(), resched_wanted() and clear_resched() have been changed to take a process to act on rather than assuming curproc so that they can be used to implement forward_roundrobin() as described above. - Various other SMP variables have been moved to a MI subr_smp.c and a new header sys/smp.h declares MI SMP variables and API's. The IPI API's from machine/ipl.h have moved to machine/smp.h which is included by sys/smp.h. - The globaldata_register() and globaldata_find() functions as well as the SLIST of globaldata structures has become MI and moved into subr_smp.c. Also, the globaldata list is only available if SMP support is compiled in. Reviewed by: jake, peter Looked over by: eivind Revision Changes Path 1.18 +34 -33 src/sys/alpha/alpha/db_interface.c 1.49 +25 -8 src/sys/alpha/alpha/interrupt.c 1.126 +2 -18 src/sys/alpha/alpha/machdep.c 1.18 +40 -645 src/sys/alpha/alpha/mp_machdep.c 1.56 +2 -2 src/sys/alpha/alpha/pmap.c 1.58 +4 -4 src/sys/alpha/alpha/trap.c 1.28 +1 -2 src/sys/alpha/include/cpu.h 1.9 +1 -8 src/sys/alpha/include/globaldata.h 1.19 +1 -20 src/sys/alpha/include/ipl.h 1.4 +15 -32 src/sys/alpha/include/smp.h 1.511 +2 -1 src/sys/conf/files 1.9 +2 -2 src/sys/conf/files.ia64 1.58 +32 -31 src/sys/i386/i386/db_interface.c 1.13 +2 -5 src/sys/i386/i386/i686_mem.c 1.447 +7 -16 src/sys/i386/i386/machdep.c 1.155 +53 -545 src/sys/i386/i386/mp_machdep.c 1.54 +11 -5 src/sys/i386/i386/sys_machdep.c 1.184 +3 -3 src/sys/i386/i386/trap.c 1.155 +2 -4 src/sys/i386/i386/vm_machdep.c 1.61 +1 -3 src/sys/i386/include/cpu.h 1.27 +1 -4 src/sys/i386/include/globaldata.h 1.28 +1 -20 src/sys/i386/include/ipl.h 1.65 +24 -28 src/sys/i386/include/smp.h 1.71 +44 -113 src/sys/i386/isa/apic_vector.s 1.172 +13 -2 src/sys/i386/isa/clock.c 1.30 +6 -4 src/sys/i386/isa/intr_machdep.h 1.6 +2 -2 src/sys/ia64/ia64/db_interface.c 1.30 +14 -9 src/sys/ia64/ia64/machdep.c 1.15 +8 -283 src/sys/ia64/ia64/mp_machdep.c 1.18 +4 -4 src/sys/ia64/ia64/trap.c 1.17 +1 -4 src/sys/ia64/include/cpu.h 1.9 +1 -5 src/sys/ia64/include/globaldata.h 1.5 +1 -16 src/sys/ia64/include/ipl.h 1.2 +14 -29 src/sys/ia64/include/smp.h 1.125 +76 -61 src/sys/kern/kern_clock.c 1.15 +18 -12 src/sys/kern/kern_idle.c 1.53 +2 -2 src/sys/kern/kern_intr.c 1.40 +2 -2 src/sys/kern/kern_mib.c 1.100 +2 -2 src/sys/kern/kern_shutdown.c 1.117 +4 -5 src/sys/kern/kern_sig.c 1.134 +6 -6 src/sys/kern/kern_synch.c 1.155 +164 -2749 src/sys/kern/subr_smp.c 1.212 +4 -12 src/sys/pc98/i386/machdep.c 1.12 +4 -4 src/sys/posix4/ksched.c 1.6 +2 -2 src/sys/powerpc/powerpc/mp_machdep.c 1.161 +6 -6 src/sys/sys/proc.h 1.65 +46 -137 src/sys/sys/smp.h 1.139 +3 -1 src/sys/sys/systm.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message