linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] powerpc/crypto: Add cond_resched() in crc-vpmsum self-test
@ 2019-11-03 23:33 Chris Smart
  2019-11-14  9:08 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Smart @ 2019-11-03 23:33 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: distroguy, Chris Smart

The stress test for vpmsum implementations executes a long for loop in
the kernel. This blocks the scheduler, which prevents other tasks from
running, resulting in a warning.

This fix adds a call to cond_reshed() at the end of each loop, which
allows the scheduler to run other tasks as required.

Signed-off-by: Chris Smart <chris.smart@humanservices.gov.au>
---
 arch/powerpc/crypto/crc-vpmsum_test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/crypto/crc-vpmsum_test.c b/arch/powerpc/crypto/crc-vpmsum_test.c
index 47985219a68f..dce86e75f1a8 100644
--- a/arch/powerpc/crypto/crc-vpmsum_test.c
+++ b/arch/powerpc/crypto/crc-vpmsum_test.c
@@ -103,6 +103,7 @@ static int __init crc_test_init(void)
 				       crc32, verify32, len);
 				break;
 			}
+		cond_resched();
 		}
 		pr_info("crc-vpmsum_test done, completed %lu iterations\n", i);
 	} while (0);
-- 
2.21.0

********************************************************************** IMPORTANT: This e-mail is for the use of the intended recipient only and may contain information that is confidential, commercially valuable and/or subject to legal or parliamentary privilege. If you are not the intended recipient you are notified that any review, re-transmission, disclosure, dissemination or other use of, or taking of any action in reliance upon, this information is prohibited and may result in severe penalties. If you have received this e-mail in error please notify the sender immediately and delete all electronic and hard copies of this transmission together with any attachments. Please consider the environment before printing this e-mail **********************************************************************


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] powerpc/crypto: Add cond_resched() in crc-vpmsum self-test
  2019-11-03 23:33 [PATCH 1/1] powerpc/crypto: Add cond_resched() in crc-vpmsum self-test Chris Smart
@ 2019-11-14  9:08 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2019-11-14  9:08 UTC (permalink / raw)
  To: Chris Smart, linuxppc-dev; +Cc: distroguy, Chris Smart

On Sun, 2019-11-03 at 23:33:56 UTC, Chris Smart wrote:
> The stress test for vpmsum implementations executes a long for loop in
> the kernel. This blocks the scheduler, which prevents other tasks from
> running, resulting in a warning.
> 
> This fix adds a call to cond_reshed() at the end of each loop, which
> allows the scheduler to run other tasks as required.
> 
> Signed-off-by: Chris Smart <chris.smart@humanservices.gov.au>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/9f0acf9f80ad504573e6482fb00b53866a9b9d2f

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-14 10:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-03 23:33 [PATCH 1/1] powerpc/crypto: Add cond_resched() in crc-vpmsum self-test Chris Smart
2019-11-14  9:08 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).