This has been hanging around for at least 6 months with various people using it.

I should've mentioned also that I had to change a number of places that try to optimize away selwakeup/selrecord calls using a flag that requires whether there is a waiter or not. We used to only support one waiter, but now you must use SEL_WAITING to determine if this is the case. Hopefully I found all of these places.

Thanks,
Jeff

On Sun, 16 Dec 2007, Jeff Roberson wrote:

jeff        2007-12-16 06:21:20 UTC

 FreeBSD src repository

 Modified files:
   sys/kern             kern_event.c kern_thread.c sys_generic.c
                        sys_pipe.c uipc_sockbuf.c
   sys/netncp           ncp_rq.c ncp_sock.c ncp_sock.h
   sys/netsmb           smb_trantcp.c
   sys/sys              proc.h selinfo.h socketvar.h systm.h
 Log:
 Refactor select to reduce contention and hide internal implementation
 details from consumers.

  - Track individual selecters on a per-descriptor basis such that there
    are no longer collisions and after sleeping for events only those
    descriptors which triggered events must be rescaned.
  - Protect the selinfo (per descriptor) structure with a mtx pool mutex.
    mtx pool mutexes were chosen to preserve api compatibility with
    existing code which does nothing but bzero() to setup selinfo
    structures.
  - Use a per-thread wait channel rather than a global wait channel.
  - Hide select implementation details in a seltd structure which is
    opaque to the rest of the kernel.
  - Provide a 'selsocket' interface for those kernel consumers who wish to
    select on a socket when they have no fd so they no longer have to
    be aware of select implementation details.

 Tested by:      kris
 Reviewed on:    arch

 Revision  Changes    Path
 1.114     +6 -3      src/sys/kern/kern_event.c
 1.264     +2 -0      src/sys/kern/kern_thread.c
 1.160     +414 -168  src/sys/kern/sys_generic.c
 1.194     +6 -3      src/sys/kern/sys_pipe.c
 1.173     +2 -1      src/sys/kern/uipc_sockbuf.c
 1.16      +9 -3      src/sys/netncp/ncp_rq.c
 1.20      +0 -105    src/sys/netncp/ncp_sock.c
 1.7       +0 -3      src/sys/netncp/ncp_sock.h
 1.27      +1 -79     src/sys/netsmb/smb_trantcp.c
 1.498     +2 -3      src/sys/sys/proc.h
 1.19      +8 -8      src/sys/sys/selinfo.h
 1.159     +2 -0      src/sys/sys/socketvar.h
 1.263     +0 -4      src/sys/sys/systm.h

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to