Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 May 2006 20:17:01 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/opencrypto crypto.c cryptodev.h
Message-ID:  <20060517181701.GC838@garage.freebsd.pl>
In-Reply-To: <200605171812.k4HICiLw040136@repoman.freebsd.org>
References:  <200605171812.k4HICiLw040136@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060517181701.GC838>