Re: [PATCH v2 1/4] s390/crypto: Replace cond_resched() with msleep(1)
From: Holger Dengler
Date: Tue Jul 28 2026 - 12:45:45 EST
On 7/28/26 17:04, Heiko Carstens wrote:
With [1] cond_resched() is always compiled away and becomes a no-op.
The comments for all cond_resched() calls in crypto code however indicate
that the current process should be scheduled away to avoid instant
re-invocation of a callback. This is not what cond_resched() would do or
did.
Instead of just removing the cond_resched() calls, replace them with
msleep() calls, as suggested by Holger Dengler. This forces the current
task to be scheduled away (sleeps) like originally intended.
[1] commit 7dadeaa6e851 ("sched: Further restrict the preemption modes")
Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
Reviewed-by: Holger Dengler <dengler@xxxxxxxxxxxxx>
--
Mit freundlichen Grüßen / Kind regards
Holger Dengler