From owner-cvs-all@FreeBSD.ORG Wed May 17 18:19:02 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org 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 6372116A905; Wed, 17 May 2006 18:19:02 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1C4843D67; Wed, 17 May 2006 18:18:59 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 54F2350EA7; Wed, 17 May 2006 20:18:58 +0200 (CEST) Received: from localhost (dkc188.neoplus.adsl.tpnet.pl [83.24.6.188]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id C18E150E82; Wed, 17 May 2006 20:18:52 +0200 (CEST) Date: Wed, 17 May 2006 20:17:01 +0200 From: Pawel Jakub Dawidek To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Message-ID: <20060517181701.GC838@garage.freebsd.pl> References: <200605171812.k4HICiLw040136@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nmemrqcdn5VTmUEE" Content-Disposition: inline In-Reply-To: <200605171812.k4HICiLw040136@repoman.freebsd.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r535 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: Subject: Re: cvs commit: src/sys/opencrypto crypto.c cryptodev.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: Wed, 17 May 2006 18:19:02 -0000 --nmemrqcdn5VTmUEE Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 17, 2006 at 06:12:44PM +0000, Pawel Jakub Dawidek wrote: +> pjd 2006-05-17 18:12:44 UTC +>=20 +> FreeBSD src repository +>=20 +> Modified files: +> sys/opencrypto crypto.c cryptodev.h=20 +> Log: +> - Make opencrypto more SMP friendly by dropping the queue lock around +> crypto_invoke(). This allows to serve multiple crypto requests in +> parallel and not bached requests are served lock-less. +> Drivers should not depend on the queue lock beeing held around +> crypto_invoke() and if they do, that's an error in the driver - it +> should do its own synchronization. +> - Don't forget to wakeup the crypto thread when new requests is +> queued and only if both symmetric and asymmetric queues are empty. +> - Symmetric requests use sessions and there is no way driver can +> disappear when there is an active session, so we don't need to check +> this, but assert this. This is also safe to not use the driver lock +> in this case. +> - Assymetric requests don't use sessions, so don't check the driver +> in crypto_kinvoke(). +> - Protect assymetric operation with the driver lock, because if there +> is no symmetric session, driver can disappear. +> - Don't send assymetric request to the driver if it is marked as +> blocked. +> - Add an XXX comment, because I don't think migration to another driver +> is safe when there are pending requests using freed session. +> - Remove 'hint' argument from crypto_kinvoke(), as it serves no purpos= e. +> - Don't hold the driver lock around kprocess method call, instead use +> cc_koperations to track number of in-progress requests. +> - Cleanup register/unregister code a bit. +> - Other small simplifications and cleanups. +> =20 +> Reviewed by: sam Forgot to add: Tested on: hifn(4), ubsec(4), cryptosoft --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --nmemrqcdn5VTmUEE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEa2idForvXbEpPzQRArpZAJ0URB993JHQrPgasemB0AmTarpz3ACg0mQC 2HwaeN0duK0N0w/+WMZccAU= =tRQl -----END PGP SIGNATURE----- --nmemrqcdn5VTmUEE--