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

From: Holger Dengler

Date: Thu Jul 30 2026 - 04:02:21 EST


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 <hca@xxxxxxxxxxxxx>

As in v2
Reviewed-by: Holger Dengler <dengler@xxxxxxxxxxxxx>

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