From owner-cvs-src@FreeBSD.ORG Thu Jul 22 18:35:43 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4D0F16A4CE; Thu, 22 Jul 2004 18:35:43 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B05A443D1F; Thu, 22 Jul 2004 18:35:43 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i6MIZhsQ010799; Thu, 22 Jul 2004 18:35:43 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i6MIZhg4010798; Thu, 22 Jul 2004 18:35:43 GMT (envelope-from rwatson) Message-Id: <200407221835.i6MIZhg4010798@repoman.freebsd.org> From: Robert Watson Date: Thu, 22 Jul 2004 18:35:43 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_descrip.c kern_event.c sys_socket.c vfs_vnops.c src/sys/opencrypto cryptodev.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2004 18:35:43 -0000 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