RE: [PATCH v4 10/24] crypto: x86/poly - limit FPU preemption

From: Elliott, Robert (Servers)
Date: Fri Dec 02 2022 - 11:16:14 EST




> -----Original Message-----
> From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Sent: Friday, December 2, 2022 3:25 AM
> To: Elliott, Robert (Servers) <elliott@xxxxxxx>
> Subject: Re: [PATCH v4 10/24] crypto: x86/poly - limit FPU preemption
>
> On Fri, Dec 02, 2022 at 06:21:02AM +0000, Elliott, Robert (Servers) wrote:
...
> BTW, just a minor nit but you can delete the cond_resched() call
> because kernel_fpu_end()/preempt_enable() will do it anyway.

That happens under
CONFIG_PREEMPTION=y
(from include/Linux/preempt.h and arch/x86/include/asm/preempt.h)

Is calling cond_resched() still helpful if that is not the configuration?