kernel - Change the discrete mplock into mp_token
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 11 Dec 2010 20:59:46 +0000 (12:59 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 11 Dec 2010 21:09:27 +0000 (13:09 -0800)
commitb5d16701e255c342d21e69a6c80b8711c028dc65
tree60441abab7eb3255dd0ff98a856c522d877df842
parent222493cf3749450bca9093fea65b74d342f1b089
kernel - Change the discrete mplock into mp_token

* Use a lwkt_token for the mp_lock.  This consolidates our longer-term
  spinnable locks (the mplock and tokens) into just tokens, making it
  easier to solve performance issues.

* Some refactoring of the token code was needed to guarantee the ordering
  when acquiring and releasing the mp_token vs other tokens.

* The thread switch code, lwkt_switch(), is simplified by this change
  though not necessarily faster.

* Remove td_mpcount, mp_lock, and other related fields.

* Remove assertions related to td_mpcount and friends, generally folding
  them into similar assertions for tokens.
44 files changed:
sys/bus/cam/cam_sim.c
sys/conf/files
sys/ddb/db_ps.c
sys/kern/init_main.c
sys/kern/kern_intr.c
sys/kern/kern_kinfo.c
sys/kern/kern_mplock.c [deleted file]
sys/kern/kern_shutdown.c
sys/kern/lwkt_thread.c
sys/kern/lwkt_token.c
sys/kern/tty_cons.c
sys/kern/usched_bsd4.c
sys/kern/usched_dummy.c
sys/platform/pc32/apic/apic_vector.s
sys/platform/pc32/i386/exception.s
sys/platform/pc32/i386/genassym.c
sys/platform/pc32/i386/locore.s
sys/platform/pc32/i386/machdep.c
sys/platform/pc32/i386/mp_machdep.c
sys/platform/pc32/i386/trap.c
sys/platform/pc32/i386/vm86.c
sys/platform/pc32/i386/vm_machdep.c
sys/platform/pc32/isa/ipl.s
sys/platform/pc64/apic/apic_vector.s
sys/platform/pc64/x86_64/exception.S
sys/platform/pc64/x86_64/genassym.c
sys/platform/pc64/x86_64/ipl.s
sys/platform/pc64/x86_64/machdep.c
sys/platform/pc64/x86_64/mp_machdep.c
sys/platform/pc64/x86_64/trap.c
sys/platform/vkernel/i386/cpu_regs.c
sys/platform/vkernel/i386/fork_tramp.s
sys/platform/vkernel/i386/genassym.c
sys/platform/vkernel/i386/mp.c
sys/platform/vkernel/i386/trap.c
sys/platform/vkernel64/x86_64/fork_tramp.s
sys/platform/vkernel64/x86_64/genassym.c
sys/platform/vkernel64/x86_64/mp.c
sys/platform/vkernel64/x86_64/trap.c
sys/sys/mplock2.h
sys/sys/thread.h
sys/sys/thread2.h
sys/vfs/procfs/procfs_ctl.c
sys/vfs/tmpfs/tmpfs_vnops.c