Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jan 2002 14:54:19 -0800 (PST)
From:      Alfred Perlstein <alfred@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/sys filedesc.h src/sys/kern kern_descrip.c sys_generic.c
Message-ID:  <200201292254.g0TMsJn05053@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
alfred      2002/01/29 14:54:19 PST

  Modified files:
    sys/sys              filedesc.h 
    sys/kern             kern_descrip.c sys_generic.c 
  Log:
  Attempt to fixup select(2) and poll(2), this should fix some races with
  other threads as well as speed up the interfaces.
  
  To fix the race and accomplish the speedup, remove selholddrop and
  pollholddrop.  The entire concept is somewhat bogus because holding
  the individual struct file pointers offers us no guarantees that
  another thread context won't close it on us thereby removing our
  access to our own reference.
  
  Selholddrop and pollholddrop also would do multiple locks and unlocks
  of mutexes _per-file_ in the fd arrays to be scanned, this needed to
  be sped up.
  
  Instead of using selholddrop and pollholddrop, simply hold the
  filedesc lock over the selscan and pollscan functions.  This should
  protect us against close(2)'s on the files as reduce the multiple
  lock/unlock pairs per fd into a single lock over the filedesc.
  
  Revision  Changes    Path
  1.122     +1 -3      src/sys/kern/kern_descrip.c
  1.90      +9 -122    src/sys/kern/sys_generic.c
  1.34      +12 -0     src/sys/sys/filedesc.h

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?200201292254.g0TMsJn05053>