cvs commit: src/sys/kern kern_descrip.c kern_event.c sys_socket.c vfs_vnops.c src/sys/opencrypto cryptodev.c

Robert Watson rwatson at FreeBSD.org
Thu Jul 22 11:35:43 PDT 2004


rwatson     2004-07-22 18:35:43 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_descrip.c kern_event.c sys_socket.c 
                         vfs_vnops.c 
    sys/opencrypto       cryptodev.c 
  Log:
  Push acquisition of Giant from fdrop_closed() into fo_close() so that
  individual file object implementations can optionally acquire Giant if
  they require it:
  
  - soo_close(): depends on debug.mpsafenet
  - pipe_close(): Giant not acquired
  - kqueue_close(): Giant required
  - vn_close(): Giant required
  - cryptof_close(): Giant required (conservative)
  
  Notes:
  
    Giant is still acquired in close() even when closing MPSAFE objects
    due to kqueue requiring Giant in the calling closef() code.
    Microbenchmarks indicate that this removal of Giant cuts 3%-3% off
    of pipe create/destroy pairs from user space with SMP compiled into
    the kernel.
  
    The cryptodev and opencrypto code appears MPSAFE, but I'm unable to
    test it extensively and so have left Giant over fo_close().  It can
    probably be removed given some testing and review.
  
  Revision  Changes    Path
  1.237     +0 -2      src/sys/kern/kern_descrip.c
  1.73      +2 -1      src/sys/kern/kern_event.c
  1.62      +2 -0      src/sys/kern/sys_socket.c
  1.204     +5 -3      src/sys/kern/vfs_vnops.c
  1.21      +7 -0      src/sys/opencrypto/cryptodev.c


More information about the cvs-all mailing list