Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Feb 2001 22:11:45 -0800 (PST)
From:      Bosko Milekic <bmilekic@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/alpha/alpha busdma_machdep.c interrupt.c machdep.c mp_machdep.c procfs_machdep.c trap.c vm_machdep.c src/sys/alpha/include cpu.h mutex.h src/sys/alpha/osf1 osf1_misc.c src/sys/compat/linprocfs linprocfs_misc.c src/sys/compat/linux ...
Message-ID:  <200102090611.f196Bkx97248@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
bmilekic    2001/02/08 22:11:45 PST

  Modified files:
    sys/alpha/alpha      busdma_machdep.c interrupt.c machdep.c 
                         mp_machdep.c procfs_machdep.c trap.c 
                         vm_machdep.c 
    sys/alpha/include    cpu.h mutex.h 
    sys/alpha/osf1       osf1_misc.c 
    sys/compat/linprocfs linprocfs_misc.c 
    sys/compat/linux     linux_misc.c 
    sys/compat/svr4      svr4_misc.c 
    sys/dev/acpica/Osd   OsdSynch.c 
    sys/dev/an           if_anreg.h 
    sys/dev/ichsmb       ichsmb.c 
    sys/dev/isp          isp_freebsd.c isp_freebsd.h 
    sys/dev/pccbb        pccbb.c 
    sys/dev/random       harvest.c yarrow.c 
    sys/dev/usb          if_auereg.h if_cuereg.h if_kuereg.h 
    sys/dev/vinum        vinumdaemon.c vinumlock.c 
    sys/dev/wi           if_wireg.h 
    sys/fs/hpfs          hpfs_hash.c 
    sys/gnu/ext2fs       ext2_vfsops.c 
    sys/i386/i386        machdep.c mp_machdep.c mpapic.c 
                         procfs_machdep.c trap.c vm86.c 
                         vm_machdep.c 
    sys/i386/include     cpu.h lock.h mutex.h profile.h 
    sys/i386/isa         clock.c if_el.c intr_machdep.c ithread.c 
                         npx.c 
    sys/ia64/ia64        interrupt.c machdep.c mp_machdep.c 
                         procfs_machdep.c trap.c vm_machdep.c 
    sys/ia64/include     cpu.h mutex.h 
    sys/isa              sio.c 
    sys/isofs/cd9660     cd9660_node.c 
    sys/kern             imgact_elf.c init_main.c kern_acct.c 
                         kern_clock.c kern_condvar.c kern_exit.c 
                         kern_fork.c kern_idle.c kern_intr.c 
                         kern_kthread.c kern_lock.c kern_malloc.c 
                         kern_mutex.c kern_proc.c kern_prot.c 
                         kern_resource.c kern_shutdown.c 
                         kern_sig.c kern_subr.c kern_synch.c 
                         kern_timeout.c subr_eventhandler.c 
                         subr_prof.c subr_rman.c sys_generic.c 
                         sys_process.c tty.c uipc_mbuf.c 
                         uipc_syscalls.c vfs_aio.c vfs_bio.c 
                         vfs_conf.c vfs_default.c vfs_subr.c 
                         vfs_syscalls.c vfs_vnops.c 
    sys/miscfs/deadfs    dead_vnops.c 
    sys/miscfs/nullfs    null_vnops.c 
    sys/miscfs/procfs    procfs_ctl.c procfs_status.c 
    sys/msdosfs          msdosfs_denode.c msdosfs_vfsops.c 
                         msdosfs_vnops.c 
    sys/net              if_var.h 
    sys/netgraph         ng_base.c 
    sys/nfs              nfs_nqlease.c 
    sys/ntfs             ntfs_ihash.c ntfs_subr.c ntfs_vfsops.c 
    sys/nwfs             nwfs_node.c nwfs_vnops.c 
    sys/pc98/i386        machdep.c 
    sys/pc98/pc98        clock.c npx.c sio.c 
    sys/pci              if_dcreg.h if_fxpvar.h if_pcnreg.h 
                         if_rlreg.h if_sfreg.h if_sisreg.h 
                         if_skreg.h if_stereg.h if_tireg.h 
                         if_tlreg.h if_vrreg.h if_wbreg.h 
                         if_wxvar.h if_xlreg.h 
    sys/powerpc/powerpc  mp_machdep.c 
    sys/sys              buf.h mbuf.h mutex.h proc.h 
    sys/ufs/ffs          ffs_vfsops.c 
    sys/ufs/ifs          ifs_vfsops.c 
    sys/ufs/ufs          ufs_ihash.c ufs_quota.c ufs_vnops.c 
    sys/vm               vm_fault.c vm_glue.c vm_map.h vm_meter.c 
                         vm_object.c vm_pageout.c vm_zone.c 
  Log:
  Change and clean the mutex lock interface.
  
  mtx_enter(lock, type) becomes:
  
  mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks)
  mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)
  
  similarily, for releasing a lock, we now have:
  
  mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN.
  We change the caller interface for the two different types of locks
  because the semantics are entirely different for each case, and this
  makes it explicitly clear and, at the same time, it rids us of the
  extra `type' argument.
  
  The enter->lock and exit->unlock change has been made with the idea
  that we're "locking data" and not "entering locked code" in mind.
  
  Further, remove all additional "flags" previously passed to the
  lock acquire/release routines with the exception of two:
  
  MTX_QUIET and MTX_NOSWITCH
  
  The functionality of these flags is preserved and they can be passed
  to the lock/unlock routines by calling the corresponding wrappers:
  
  mtx_{lock, unlock}_flags(lock, flag(s)) and
  mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN
  locks, respectively.
  
  Re-inline some lock acq/rel code; in the sleep lock case, we only
  inline the _obtain_lock()s in order to ensure that the inlined code
  fits into a cache line. In the spin lock case, we inline recursion and
  actually only perform a function call if we need to spin. This change
  has been made with the idea that we generally tend to avoid spin locks
  and that also the spin locks that we do have and are heavily used
  (i.e. sched_lock) do recurse, and therefore in an effort to reduce
  function call overhead for some architectures (such as alpha), we
  inline recursion for this case.
  
  Create a new malloc type for the witness code and retire from using
  the M_DEV type. The new type is called M_WITNESS and is only declared
  if WITNESS is enabled.
  
  Begin cleaning up some machdep/mutex.h code - specifically updated the
  "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN
  and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently
  need those.
  
  Finally, caught up to the interface changes in all sys code.
  
  Contributors: jake, jhb, jasone (in no particular order)
  
  Revision  Changes    Path
  1.15      +11 -11    src/sys/alpha/alpha/busdma_machdep.c
  1.39      +7 -7      src/sys/alpha/alpha/interrupt.c
  1.113     +2 -2      src/sys/alpha/alpha/machdep.c
  1.12      +10 -10    src/sys/alpha/alpha/mp_machdep.c
  1.6       +13 -13    src/sys/alpha/alpha/procfs_machdep.c
  1.43      +39 -39    src/sys/alpha/alpha/trap.c
  1.43      +5 -5      src/sys/alpha/alpha/vm_machdep.c
  1.24      +3 -3      src/sys/alpha/include/cpu.h
  1.18      +17 -32    src/sys/alpha/include/mutex.h
  1.12      +3 -3      src/sys/alpha/osf1/osf1_misc.c
  1.19      +3 -3      src/sys/compat/linprocfs/linprocfs_misc.c
  1.94      +3 -3      src/sys/compat/linux/linux_misc.c
  1.24      +7 -7      src/sys/compat/svr4/svr4_misc.c
  1.5       +5 -5      src/sys/dev/acpica/Osd/OsdSynch.c
  1.5       +3 -3      src/sys/dev/an/if_anreg.h
  1.4       +23 -23    src/sys/dev/ichsmb/ichsmb.c
  1.56      +3 -3      src/sys/dev/isp/isp_freebsd.c
  1.45      +3 -3      src/sys/dev/isp/isp_freebsd.h
  1.12      +14 -14    src/sys/dev/pccbb/pccbb.c
  1.11      +2 -2      src/sys/dev/random/harvest.c
  1.30      +37 -37    src/sys/dev/random/yarrow.c
  1.7       +3 -3      src/sys/dev/usb/if_auereg.h
  1.7       +3 -3      src/sys/dev/usb/if_cuereg.h
  1.7       +3 -3      src/sys/dev/usb/if_kuereg.h
  1.20      +3 -3      src/sys/dev/vinum/vinumdaemon.c
  1.22      +3 -3      src/sys/dev/vinum/vinumlock.c
  1.11      +3 -3      src/sys/dev/wi/if_wireg.h
  1.9       +13 -13    src/sys/fs/hpfs/hpfs_hash.c
  1.76      +14 -14    src/sys/gnu/ext2fs/ext2_vfsops.c
  1.439     +2 -2      src/sys/i386/i386/machdep.c
  1.145     +11 -11    src/sys/i386/i386/mp_machdep.c
  1.47      +5 -5      src/sys/i386/i386/mpapic.c
  1.16      +22 -22    src/sys/i386/i386/procfs_machdep.c
  1.172     +55 -55    src/sys/i386/i386/trap.c
  1.38      +5 -5      src/sys/i386/i386/vm86.c
  1.151     +5 -5      src/sys/i386/i386/vm_machdep.c
  1.57      +3 -3      src/sys/i386/include/cpu.h
  1.18      +5 -5      src/sys/i386/include/lock.h
  1.27      +67 -24    src/sys/i386/include/mutex.h
  1.22      +3 -3      src/sys/i386/include/profile.h
  1.168     +17 -17    src/sys/i386/isa/clock.c
  1.54      +3 -3      src/sys/i386/isa/if_el.c
  1.50      +3 -3      src/sys/i386/isa/intr_machdep.c
  1.12      +8 -8      src/sys/i386/isa/ithread.c
  1.91      +3 -3      src/sys/i386/isa/npx.c
  1.7       +4 -4      src/sys/ia64/ia64/interrupt.c
  1.22      +2 -2      src/sys/ia64/ia64/machdep.c
  1.10      +3 -3      src/sys/ia64/ia64/mp_machdep.c
  1.4       +12 -12    src/sys/ia64/ia64/procfs_machdep.c
  1.12      +39 -39    src/sys/ia64/ia64/trap.c
  1.11      +3 -3      src/sys/ia64/ia64/vm_machdep.c
  1.10      +3 -3      src/sys/ia64/include/cpu.h
  1.8       +5 -17     src/sys/ia64/include/mutex.h
  1.323     +44 -44    src/sys/isa/sio.c
  1.36      +9 -9      src/sys/isofs/cd9660/cd9660_node.c
  1.89      +3 -3      src/sys/kern/imgact_elf.c
  1.154     +7 -7      src/sys/kern/init_main.c
  1.30      +3 -3      src/sys/kern/kern_acct.c
  1.120     +15 -15    src/sys/kern/kern_clock.c
  1.3       +31 -31    src/sys/kern/kern_condvar.c
  1.115     +7 -7      src/sys/kern/kern_exit.c
  1.97      +9 -9      src/sys/kern/kern_fork.c
  1.12      +3 -3      src/sys/kern/kern_idle.c
  1.38      +7 -7      src/sys/kern/kern_intr.c
  1.13      +3 -3      src/sys/kern/kern_kthread.c
  1.41      +13 -13    src/sys/kern/kern_lock.c
  1.83      +13 -13    src/sys/kern/kern_malloc.c
  1.41      +399 -543  src/sys/kern/kern_mutex.c
  1.84      +3 -3      src/sys/kern/kern_proc.c
  1.73      +8 -8      src/sys/kern/kern_prot.c
  1.72      +21 -21    src/sys/kern/kern_resource.c
  1.94      +4 -4      src/sys/kern/kern_shutdown.c
  1.106     +25 -25    src/sys/kern/kern_sig.c
  1.40      +3 -3      src/sys/kern/kern_subr.c
  1.125     +43 -43    src/sys/kern/kern_synch.c
  1.66      +20 -20    src/sys/kern/kern_timeout.c
  1.11      +7 -7      src/sys/kern/subr_eventhandler.c
  1.41      +4 -4      src/sys/kern/subr_prof.c
  1.18      +22 -22    src/sys/kern/subr_rman.c
  1.72      +7 -7      src/sys/kern/sys_generic.c
  1.61      +13 -13    src/sys/kern/sys_process.c
  1.147     +3 -3      src/sys/kern/tty.c
  1.65      +16 -16    src/sys/kern/uipc_mbuf.c
  1.84      +7 -7      src/sys/kern/uipc_syscalls.c
  1.91      +2 -2      src/sys/kern/vfs_aio.c
  1.272     +2 -2      src/sys/kern/vfs_bio.c
  1.57      +3 -3      src/sys/kern/vfs_conf.c
  1.40      +3 -3      src/sys/kern/vfs_default.c
  1.303     +88 -88    src/sys/kern/vfs_subr.c
  1.176     +24 -24    src/sys/kern/vfs_syscalls.c
  1.108     +7 -7      src/sys/kern/vfs_vnops.c
  1.30      +2 -2      src/sys/miscfs/deadfs/dead_vnops.c
  1.46      +3 -3      src/sys/miscfs/nullfs/null_vnops.c
  1.24      +17 -17    src/sys/miscfs/procfs/procfs_ctl.c
  1.26      +4 -4      src/sys/miscfs/procfs/procfs_status.c
  1.54      +9 -9      src/sys/msdosfs/msdosfs_denode.c
  1.71      +8 -8      src/sys/msdosfs/msdosfs_vfsops.c
  1.107     +3 -3      src/sys/msdosfs/msdosfs_vnops.c
  1.32      +3 -3      src/sys/net/if_var.h
  1.47      +68 -68    src/sys/netgraph/ng_base.c
  1.56      +4 -4      src/sys/nfs/nfs_nqlease.c
  1.15      +7 -7      src/sys/ntfs/ntfs_ihash.c
  1.13      +8 -8      src/sys/ntfs/ntfs_subr.c
  1.27      +3 -3      src/sys/ntfs/ntfs_vfsops.c
  1.15      +2 -2      src/sys/nwfs/nwfs_node.c
  1.14      +8 -8      src/sys/nwfs/nwfs_vnops.c
  1.204     +2 -2      src/sys/pc98/i386/machdep.c
  1.99      +17 -17    src/sys/pc98/pc98/clock.c
  1.65      +3 -3      src/sys/pc98/pc98/npx.c
  1.144     +44 -44    src/sys/pc98/pc98/sio.c
  1.18      +3 -3      src/sys/pci/if_dcreg.h
  1.15      +3 -3      src/sys/pci/if_fxpvar.h
  1.7       +3 -3      src/sys/pci/if_pcnreg.h
  1.18      +3 -3      src/sys/pci/if_rlreg.h
  1.8       +3 -3      src/sys/pci/if_sfreg.h
  1.6       +3 -3      src/sys/pci/if_sisreg.h
  1.15      +5 -5      src/sys/pci/if_skreg.h
  1.7       +3 -3      src/sys/pci/if_stereg.h
  1.23      +3 -3      src/sys/pci/if_tireg.h
  1.17      +3 -3      src/sys/pci/if_tlreg.h
  1.10      +3 -3      src/sys/pci/if_vrreg.h
  1.9       +3 -3      src/sys/pci/if_wbreg.h
  1.9       +5 -5      src/sys/pci/if_wxvar.h
  1.31      +3 -3      src/sys/pci/if_xlreg.h
  1.3       +5 -5      src/sys/powerpc/powerpc/mp_machdep.c
  1.115     +3 -3      src/sys/sys/buf.h
  1.68      +17 -17    src/sys/sys/mbuf.h
  1.23      +274 -98   src/sys/sys/mutex.h
  1.146     +3 -3      src/sys/sys/proc.h
  1.138     +27 -27    src/sys/ufs/ffs/ffs_vfsops.c
  1.5       +8 -8      src/sys/ufs/ifs/ifs_vfsops.c
  1.29      +11 -11    src/sys/ufs/ufs/ufs_ihash.c
  1.42      +7 -7      src/sys/ufs/ufs/ufs_quota.c
  1.155     +7 -7      src/sys/ufs/ufs/ufs_vnops.c
  1.115     +3 -3      src/sys/vm/vm_fault.c
  1.107     +25 -25    src/sys/vm/vm_glue.c
  1.57      +5 -5      src/sys/vm/vm_map.h
  1.47      +6 -6      src/sys/vm/vm_meter.c
  1.183     +3 -3      src/sys/vm/vm_object.c
  1.171     +11 -11    src/sys/vm/vm_pageout.c
  1.41      +18 -18    src/sys/vm/vm_zone.c



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102090611.f196Bkx97248>