Date: Sun, 23 Apr 2000 11:25:27 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: freebsd-stable@FreeBSD.ORG Subject: MFCing SMP cleanups from -current into 4.x on wednesday Message-ID: <200004231825.LAA62883@apollo.backplane.com>
next in thread | raw e-mail | index | archive | help
I intend to MFC the preliminary SMP cleanups I did in current a few
weeks ago back into 4.x. My current plan is to do this on wednesday.
I do not expect there to be any complains since the SMP cleanups appear
to have been working wonderfully in -current for some time now but
if people have problems with it I can delay the MFC while we discuss
it.
I also intend to MFC the changes to the write-behind heuristic on
wednesday (search for 'Change the write-behind' in the below -current
commits for a reference). Since this is a relatively simple patch which
solves a degenerate write-stall case in -current as well as fixes one
of those silly contrived benchmarks, I do not expect there to be any
complaints.
My intention is to try to keep the 4.x and 5.x trees synchronized as
much as makes sense in regards to my own core work so people doing
add-on work can also MFC as much of it as makes sense. It should be
reasonable to do this while we are in the early stages of the release
cycle.
dillon 2000/03/27 23:16:38 PST
Modified files:
sys/alpha/alpha trap.c
sys/i386/i386 exception.s genassym.c globals.s
mp_machdep.c mplock.s simplelock.s
support.s swtch.s sys_machdep.c trap.c
vm86bios.s vm_machdep.c
sys/i386/include asnames.h cpu.h globaldata.h globals.h
ipl.h lock.h smptests.h
sys/i386/isa apic_ipl.s apic_vector.s ipl.s
ipl_funcs.c
sys/kern init_sysent.c kern_prot.c kern_sig.c
kern_switch.c kern_synch.c subr_prof.c
vfs_syscalls.c
sys/posix4 ksched.c
sys/sys ktrace.h proc.h signalvar.h sysent.h
Log:
Commit major SMP cleanups and move the BGL (big giant lock) in the
syscall path inward. A system call may select whether it needs the MP
lock or not (the default being that it does need it).
A great deal of conditional SMP code for various deadended experiments
has been removed. 'cil' and 'cml' have been removed entirely, and the
locking around the cpl has been removed. The conditional
separately-locked fast-interrupt code has been removed, meaning that
interrupts must hold the CPL now (but they pretty much had to anyway).
Another reason for doing this is that the original separate-lock for
interrupts just doesn't apply to the interrupt thread mechanism being
contemplated.
Modifications to the cpl may now ONLY occur while holding the MP
lock. For example, if an otherwise MP safe syscall needs to mess with
the cpl, it must hold the MP lock for the duration and must (as usual)
save/restore the cpl in a nested fashion.
This is precursor work for the real meat coming later: avoiding having
to hold the MP lock for common syscalls and I/O's and interrupt threads.
It is expected that the spl mechanisms and new interrupt threading
mechanisms will be able to run in tandem, allowing a slow piecemeal
transition to occur.
This patch should result in a moderate performance improvement due to
the considerable amount of code that has been removed from the critical
path, especially the simplification of the spl*() calls. The real
performance gains will come later.
Approved by: jkh
Reviewed by: current, bde (exception.s)
Some work taken from: luoqi's patch
Revision Changes Path
1.27 +4 -4 src/sys/alpha/alpha/trap.c
1.66 +79 -54 src/sys/i386/i386/exception.s
1.88 +2 -1 src/sys/i386/i386/genassym.c
1.14 +5 -3 src/sys/i386/i386/globals.s
1.116 +3 -1 src/sys/i386/i386/mp_machdep.c
1.30 +39 -249 src/sys/i386/i386/mplock.s
1.12 +6 -1 src/sys/i386/i386/simplelock.s
1.68 +14 -2 src/sys/i386/i386/support.s
1.90 +17 -10 src/sys/i386/i386/swtch.s
1.48 +2 -1 src/sys/i386/i386/sys_machdep.c
1.148 +114 -39 src/sys/i386/i386/trap.c
1.16 +2 -7 src/sys/i386/i386/vm86bios.s
1.134 +7 -7 src/sys/i386/i386/vm_machdep.c
1.45 +3 -4 src/sys/i386/include/asnames.h
1.44 +13 -7 src/sys/i386/include/cpu.h
1.12 +2 -1 src/sys/i386/include/globaldata.h
1.6 +3 -1 src/sys/i386/include/globals.h
1.18 +7 -1 src/sys/i386/include/ipl.h
1.12 +6 -74 src/sys/i386/include/lock.h
1.34 +22 -81 src/sys/i386/include/smptests.h
1.28 +20 -30 src/sys/i386/isa/apic_ipl.s
1.48 +11 -265 src/sys/i386/isa/apic_vector.s
1.33 +29 -92 src/sys/i386/isa/ipl.s
1.34 +64 -179 src/sys/i386/isa/ipl_funcs.c
1.80 +5 -5 src/sys/kern/init_sysent.c
1.54 +15 -2 src/sys/kern/kern_prot.c
1.74 +2 -1 src/sys/kern/kern_sig.c
1.4 +3 -1 src/sys/kern/kern_switch.c
1.88 +2 -1 src/sys/kern/kern_synch.c
1.33 +2 -1 src/sys/kern/subr_prof.c
1.152 +3 -1 src/sys/kern/vfs_syscalls.c
1.8 +2 -1 src/sys/posix4/ksched.c
1.20 +2 -2 src/sys/sys/ktrace.h
1.100 +12 -3 src/sys/sys/proc.h
1.35 +15 -4 src/sys/sys/signalvar.h
1.28 +5 -1 src/sys/sys/sysent.h
dillon 2000/03/28 10:06:50 PST
Modified files:
sys/i386/i386 mplock.s
sys/i386/include smp.h
sys/kern kern_clock.c kern_mib.c kern_shutdown.c
kern_sig.c kern_synch.c
sys/sys proc.h signalvar.h
Log:
The SMP cleanup commit broke UP compiles. Make UP compiles work again.
Revision Changes Path
1.31 +9 -1 src/sys/i386/i386/mplock.s
1.51 +19 -2 src/sys/i386/include/smp.h
1.107 +2 -4 src/sys/kern/kern_clock.c
1.30 +1 -4 src/sys/kern/kern_mib.c
1.73 +1 -3 src/sys/kern/kern_shutdown.c
1.75 +1 -3 src/sys/kern/kern_sig.c
1.89 +1 -3 src/sys/kern/kern_synch.c
1.101 +2 -1 src/sys/sys/proc.h
1.36 +1 -3 src/sys/sys/signalvar.h
dillon 2000/03/28 22:15:44 PST
Modified files:
sys/i386/i386 exception.s swtch.s vm86bios.s
sys/i386/isa apic_vector.s ipl.s
Log:
The SMP cleanup commit broke need_resched, this fixes that and also
removed unncessary MPLOCKED and 'lock' prefixes from the interrupt
nesting level, since (A) the MP lock is held at the time, and (B) since
the neting level is restored prior to return any interrupted code
will see a consistent value.
Revision Changes Path
1.67 +2 -2 src/sys/i386/i386/exception.s
1.91 +2 -2 src/sys/i386/i386/swtch.s
1.17 +2 -2 src/sys/i386/i386/vm86bios.s
1.49 +3 -5 src/sys/i386/isa/apic_vector.s
1.34 +4 -4 src/sys/i386/isa/ipl.s
dillon 2000/03/29 01:07:47 PST
Modified files:
sys/i386/isa ipl.s
Log:
This should fix the lockups people have been experiencing. I muffed up
giving astpending two flag bits. A cmpl $0 had to turn into a bit test.
Many thanks to: Alain Thivillon <Alain.Thivillon@hsc.fr>
Revision Changes Path
1.35 +2 -2 src/sys/i386/isa/ipl.s
dillon 2000/04/01 16:55:31 PST
Modified files:
sys/gnu/ext2fs ext2_readwrite.c
sys/kern vfs_cluster.c vfs_vnops.c
sys/sys buf.h file.h vnode.h
sys/ufs/ufs ufs_readwrite.c
Log:
Change the write-behind code to take more care when starting
async I/O's. The sequential read heuristic has been extended to
cover writes as well. We continue to call cluster_write() normally,
thus blocks in the file will still be reallocated for large (but still
random) I/O's, but I/O will only be initiated for truely sequential
writes.
This solves a number of annoying situations, especially with DBM (hash
method) writes, and also has the side effect of fixing a number of
(stupid) benchmarks.
Reviewed-by: mckusick
Revision Changes Path
1.19 +4 -2 src/sys/gnu/ext2fs/ext2_readwrite.c
1.94 +30 -9 src/sys/kern/vfs_cluster.c
1.88 +37 -28 src/sys/kern/vfs_vnops.c
1.91 +2 -2 src/sys/sys/buf.h
1.23 +3 -3 src/sys/sys/file.h
1.112 +3 -2 src/sys/sys/vnode.h
1.66 +4 -2 src/sys/ufs/ufs/ufs_readwrite.c
dillon 2000/04/02 10:52:44 PDT
Modified files:
sys/i386/i386 support.s
sys/kern init_sysent.c kern_prot.c kern_sig.c
Log:
Make the sigprocmask() and geteuid() system calls MP SAFE. Expand
commentary for copyin/copyout to indicate that they are MP SAFE as
well.
Reviewed by: msmith
Revision Changes Path
1.69 +37 -12 src/sys/i386/i386/support.s
1.81 +4 -4 src/sys/kern/init_sysent.c
1.55 +10 -7 src/sys/kern/kern_prot.c
1.76 +14 -7 src/sys/kern/kern_sig.c
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004231825.LAA62883>
