From: Alex Hornung Date: Tue, 24 Aug 2010 06:54:09 +0000 (+0100) Subject: opencrypto - Only yield for cryptosoft X-Git-Tag: v2.9.0~416 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/c5fcbac78c1afd853c4f736423750671d4988c38 opencrypto - Only yield for cryptosoft * There's no need to yield the CPU when doing hardware-assisted crypto. Move the lwkt_yield()s into cryptosoft. --- diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c index cbc6bee690..7e34357c80 100644 --- a/sys/opencrypto/crypto.c +++ b/sys/opencrypto/crypto.c @@ -830,7 +830,6 @@ crypto_dispatch(struct cryptop *crp) KASSERT(cap != NULL, ("%s: Driver disappeared.", __func__)); if (!cap->cc_qblocked) { result = crypto_invoke(cap, crp, 0); - lwkt_yield(); if (result != ERESTART) return (result); /* @@ -1363,7 +1362,6 @@ crypto_proc(void *arg) CRYPTO_Q_UNLOCK(tdinfo); result = crypto_invoke(cap, submit, hint); - lwkt_yield(); CRYPTO_Q_LOCK(tdinfo); if (result == ERESTART) { diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c index e228178959..d940a5bf30 100644 --- a/sys/opencrypto/cryptosoft.c +++ b/sys/opencrypto/cryptosoft.c @@ -1129,6 +1129,7 @@ swcr_process(device_t dev, struct cryptop *crp, int hint) done: crypto_done(crp); + lwkt_yield(); return 0; }