From owner-cvs-all Tue Dec 17 10:15: 8 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96A8A37B401; Tue, 17 Dec 2002 10:15:07 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 535B243EA9; Tue, 17 Dec 2002 10:15:07 -0800 (PST) (envelope-from sam@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gBHIF7mV035545; Tue, 17 Dec 2002 10:15:07 -0800 (PST) (envelope-from sam@repoman.freebsd.org) Received: (from sam@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gBHIF7B1035544; Tue, 17 Dec 2002 10:15:07 -0800 (PST) Message-Id: <200212171815.gBHIF7B1035544@repoman.freebsd.org> From: Sam Leffler Date: Tue, 17 Dec 2002 10:15:07 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/opencrypto crypto.c cryptodev.c cryptodev.h X-FreeBSD-CVS-Branch: RELENG_4 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG sam 2002/12/17 10:15:07 PST Modified files: (Branch: RELENG_4) sys/opencrypto crypto.c cryptodev.c cryptodev.h Log: Revise processing of crypto ops for better performance. Rather than context switch to a kernel thread to dispatch each request use a software interrupt to invoke the dispatching logic. Also, and almost as important, decouple callbacks done when ops complete from the dispatch thread. These are done in a kernel thread (as opposed to a swi context) so that clients of the crypto system don't need to be concerned with blocking crypto-related interrupts. Specific changes: o splimp's -> splcrypto's because entry to the crypto code can come at splsoftcrypto now o add system-wide statistics for the crypto system o add timing statistics for crypto ops as they pass through the system to help in analyzing performance; these are conditionally compiled in under CRYPTO_TIMING and enabled with a debug.crypto_timing sysctl o purge an unused entry from the cryptop data structure o change some wakeup's to wakeup_one since we know there's only one proc waiting o check error return from crypto_invoke in /dev/crypto support o bzero zalloc'd data in crypto_getreq (missed in previous MFC) Note: these changes are not relevant to -current because swi's are implemented with kthreads. Sponsored by: Vernier Networks Inspired by: Jonathan Stone Revision Changes Path 1.4.2.2 +232 -118 src/sys/opencrypto/crypto.c 1.4.2.2 +8 -12 src/sys/opencrypto/cryptodev.c 1.2.2.2 +28 -1 src/sys/opencrypto/cryptodev.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message