Newtoken commit. Change the token implementation as follows: (1) Obtaining
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 1 Mar 2004 06:33:24 +0000 (06:33 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 1 Mar 2004 06:33:24 +0000 (06:33 +0000)
commit41a01a4df889ac2e479e7d4691c3a044d76b0407
treeb7301718314a91030be2d82746f4300a91178bc2
parent651d119ffd8ada82a57ffb05c74c27a0c7955d4f
Newtoken commit.  Change the token implementation as follows:  (1) Obtaining
a token no longer enters a critical section.  (2) tokens can be held through
schedular switches and blocking conditions and are effectively released and
reacquired on resume.  Thus tokens serialize access only while the thread
is actually running.  Serialization is not broken by preemptive interrupts.
That is, interrupt threads which preempt do no release the preempted thread's
tokens.  (3) Unlike spl's, tokens will interlock w/ interrupt threads on
the same or on a different cpu.

The vnode interlock code has been rewritten and the API has changed.  The
mountlist vnode scanning code has been consolidated and all known races have
been fixed.  The vnode interlock is now a pool token.

The code that frees unreferenced vnodes whos last VM page has been freed has
been moved out of the low level vm_page_free() code and moved to the
periodic filesystem sycer code in vfs_msycn().

The SMP startup code and the IPI code has been cleaned up considerably.
Certain early token interactions on AP cpus have been moved to the BSP.

The LWKT rwlock API has been cleaned up and turned on.

Major testing by: David Rhodus
163 files changed:
sys/config/LINT
sys/ddb/db_ps.c
sys/dev/acpica5/Osd/OsdSynch.c
sys/dev/acpica5/acpi_ec.c
sys/dev/agp/agp.c
sys/dev/disk/ccd/ccd.c
sys/dev/disk/vn/vn.c
sys/dev/drm/drm_os_freebsd.h
sys/dev/pccard/pccbb/pccbb.c
sys/dev/raid/aac/aacvar.h
sys/emulation/43bsd/43bsd_file.c
sys/emulation/ibcs2/coff/imgact_coff.c
sys/emulation/ibcs2/i386/ibcs2_misc.c
sys/emulation/linux/i386/linprocfs/linprocfs_subr.c
sys/emulation/linux/i386/linprocfs/linprocfs_vnops.c
sys/emulation/linux/linux_file.c
sys/emulation/linux/linux_getcwd.c
sys/emulation/linux/linux_misc.c
sys/emulation/svr4/svr4_misc.c
sys/i386/apic/mpapic.c
sys/i386/apic/mpapic.h
sys/i386/conf/LINT
sys/i386/i386/machdep.c
sys/i386/i386/mp_machdep.c
sys/i386/i386/mpapic.c
sys/i386/i386/nexus.c
sys/i386/i386/pmap.c
sys/i386/include/mpapic.h
sys/i386/include/smp.h
sys/kern/imgact_elf.c
sys/kern/init_main.c
sys/kern/kern_acct.c
sys/kern/kern_acl.c
sys/kern/kern_descrip.c
sys/kern/kern_exec.c
sys/kern/kern_fp.c
sys/kern/kern_ktrace.c
sys/kern/kern_linker.c
sys/kern/kern_lock.c
sys/kern/kern_sig.c
sys/kern/kern_switch.c
sys/kern/link_aout.c
sys/kern/link_elf.c
sys/kern/lwkt_ipiq.c
sys/kern/lwkt_rwlock.c
sys/kern/lwkt_thread.c
sys/kern/lwkt_token.c
sys/kern/subr_rman.c
sys/kern/tty_tty.c
sys/kern/uipc_syscalls.c
sys/kern/uipc_usrreq.c
sys/kern/vfs_bio.c
sys/kern/vfs_cache.c
sys/kern/vfs_conf.c
sys/kern/vfs_default.c
sys/kern/vfs_lookup.c
sys/kern/vfs_subr.c
sys/kern/vfs_syscalls.c
sys/kern/vfs_vnops.c
sys/kern/vnode_if.src
sys/netproto/ncp/ncp_conn.c
sys/netproto/smb/smb_conn.c
sys/netproto/smb/smb_conn.h
sys/netproto/smb/smb_iod.c
sys/netproto/smb/smb_rq.c
sys/netproto/smb/smb_rq.h
sys/netproto/smb/smb_subr.c
sys/netproto/smb/smb_subr.h
sys/platform/pc32/apic/mpapic.c
sys/platform/pc32/apic/mpapic.h
sys/platform/pc32/i386/machdep.c
sys/platform/pc32/i386/mp_machdep.c
sys/platform/pc32/i386/mpapic.c
sys/platform/pc32/i386/nexus.c
sys/platform/pc32/i386/pmap.c
sys/platform/pc32/include/mpapic.h
sys/platform/pc32/include/smp.h
sys/sys/buf2.h
sys/sys/globaldata.h
sys/sys/kernel.h
sys/sys/lock.h
sys/sys/mount.h
sys/sys/proc.h
sys/sys/rman.h
sys/sys/thread.h
sys/sys/thread2.h
sys/sys/vnode.h
sys/vfs/coda/coda_subr.c
sys/vfs/coda/coda_vfsops.c
sys/vfs/coda/coda_vnops.c
sys/vfs/deadfs/dead_vnops.c
sys/vfs/fdesc/fdesc_vfsops.c
sys/vfs/fdesc/fdesc_vnops.c
sys/vfs/fifofs/fifo_vnops.c
sys/vfs/gnu/ext2fs/ext2_lookup.c
sys/vfs/gnu/ext2fs/ext2_vfsops.c
sys/vfs/gnu/ext2fs/ext2_vnops.c
sys/vfs/gnu/ext2fs/fs.h
sys/vfs/hpfs/hpfs.h
sys/vfs/hpfs/hpfs_hash.c
sys/vfs/hpfs/hpfs_vfsops.c
sys/vfs/isofs/cd9660/cd9660_lookup.c
sys/vfs/isofs/cd9660/cd9660_node.c
sys/vfs/isofs/cd9660/cd9660_vfsops.c
sys/vfs/mfs/mfs_vnops.c
sys/vfs/msdosfs/msdosfs_denode.c
sys/vfs/msdosfs/msdosfs_lookup.c
sys/vfs/msdosfs/msdosfs_vfsops.c
sys/vfs/msdosfs/msdosfs_vnops.c
sys/vfs/nfs/nfs_node.c
sys/vfs/nfs/nfs_nqlease.c
sys/vfs/nfs/nfs_serv.c
sys/vfs/nfs/nfs_subs.c
sys/vfs/nfs/nfs_vfsops.c
sys/vfs/nfs/nfs_vnops.c
sys/vfs/ntfs/ntfs.h
sys/vfs/ntfs/ntfs_ihash.c
sys/vfs/ntfs/ntfs_subr.c
sys/vfs/ntfs/ntfs_vfsops.c
sys/vfs/nullfs/null_subr.c
sys/vfs/nullfs/null_vfsops.c
sys/vfs/nullfs/null_vnops.c
sys/vfs/nwfs/nwfs_node.c
sys/vfs/nwfs/nwfs_vfsops.c
sys/vfs/nwfs/nwfs_vnops.c
sys/vfs/portal/portal_vfsops.c
sys/vfs/portal/portal_vnops.c
sys/vfs/procfs/procfs_subr.c
sys/vfs/procfs/procfs_vnops.c
sys/vfs/smbfs/smbfs_io.c
sys/vfs/smbfs/smbfs_node.c
sys/vfs/smbfs/smbfs_vfsops.c
sys/vfs/smbfs/smbfs_vnops.c
sys/vfs/specfs/spec_vnops.c
sys/vfs/ufs/ffs_rawread.c
sys/vfs/ufs/ffs_softdep.c
sys/vfs/ufs/ffs_vfsops.c
sys/vfs/ufs/ufs_ihash.c
sys/vfs/ufs/ufs_inode.c
sys/vfs/ufs/ufs_lookup.c
sys/vfs/ufs/ufs_quota.c
sys/vfs/ufs/ufs_vfsops.c
sys/vfs/ufs/ufs_vnops.c
sys/vfs/umapfs/umap_subr.c
sys/vfs/umapfs/umap_vfsops.c
sys/vfs/umapfs/umap_vnops.c
sys/vfs/union/union_subr.c
sys/vfs/union/union_vfsops.c
sys/vfs/union/union_vnops.c
sys/vm/vm_contig.c
sys/vm/vm_extern.h
sys/vm/vm_fault.c
sys/vm/vm_glue.c
sys/vm/vm_init.c
sys/vm/vm_kern.c
sys/vm/vm_map.c
sys/vm/vm_map.h
sys/vm/vm_object.c
sys/vm/vm_page.c
sys/vm/vm_pageout.c
sys/vm/vm_swap.c
sys/vm/vm_zone.c
sys/vm/vnode_pager.c