Re: [PATCH v3 1/4] s390/crypto: Replace cond_resched() with msleep(1)

Holger Dengler <[email protected]> Thu, 30 Jul 2026 09:47:31 +0200
Newsgroups org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel,org.kernel.vger.linux-s390
Message-ID <[email protected]>
On 7/30/26 07:29, 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 <[email protected]>

As in v2
Reviewed-by: Holger Dengler <[email protected]>

-- 
Mit freundlichen Grüßen / Kind regards
Holger Dengler