From owner-cvs-all@FreeBSD.ORG Sun Dec 16 06:21:21 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D909216A417; Sun, 16 Dec 2007 06:21:21 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B767F13C447; Sun, 16 Dec 2007 06:21:21 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lBG6LL1q050784; Sun, 16 Dec 2007 06:21:21 GMT (envelope-from jeff@repoman.freebsd.org) Received: (from jeff@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lBG6LLph050771; Sun, 16 Dec 2007 06:21:21 GMT (envelope-from jeff) Message-Id: <200712160621.lBG6LLph050771@repoman.freebsd.org> From: Jeff Roberson Date: Sun, 16 Dec 2007 06:21:20 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern kern_event.c kern_thread.c sys_generic.c sys_pipe.c uipc_sockbuf.c src/sys/netncp ncp_rq.c ncp_sock.c ncp_sock.h src/sys/netsmb smb_trantcp.c src/sys/sys proc.h selinfo.h socketvar.h systm.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2007 06:21:22 -0000 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