From: Robert Elliott <elliott@hpe.com>
To: herbert@gondor.apana.org.au, davem@davemloft.net
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
Robert Elliott <elliott@hpe.com>
Subject: [PATCH 3/3] crypto: tcrypt - yield at end of test
Date: Mon, 19 Dec 2022 14:37:33 -0600 [thread overview]
Message-ID: <20221219203733.3063192-4-elliott@hpe.com> (raw)
In-Reply-To: <20221219203733.3063192-1-elliott@hpe.com>
Call cond_resched() to let the scheduler reschedule the
CPU at the end of each test pass.
If the kernel is configured with CONFIG_PREEMPT_NONE=y (or
preempt=none is used on the kernel command line), the only
time the scheduler will intervene is when cond_resched()
is called. So, repeated calls to
modprobe tcrypt mode=<something>
hold the CPU for a long time.
Signed-off-by: Robert Elliott <elliott@hpe.com>
---
crypto/tcrypt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 3e9e4adeef02..916bddbf4e75 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -3027,6 +3027,7 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
}
+ cond_resched();
return ret;
}
--
2.38.1
next prev parent reply other threads:[~2022-12-19 20:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 20:37 [PATCH 0/3] crypto: yield at end of operations Robert Elliott
2022-12-19 20:37 ` [PATCH 1/3] crypto: skcipher - always yield at end of walk Robert Elliott
2022-12-20 3:54 ` Herbert Xu
2022-12-19 20:37 ` [PATCH 2/3] crypto: aead/shash - yield at end of operations Robert Elliott
2022-12-20 3:55 ` Herbert Xu
2022-12-19 20:37 ` Robert Elliott [this message]
2022-12-20 3:55 ` [PATCH 3/3] crypto: tcrypt - yield at end of test Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221219203733.3063192-4-elliott@hpe.com \
--to=elliott@hpe.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox