Re: [PATCH 3/3] x86/fpu: Remove init_task FPU state dependencies, add debugging warning

From: Linus Torvalds
Date: Wed Jun 05 2024 - 12:08:37 EST


On Wed, 5 Jun 2024 at 07:19, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> On 06/05, Ingo Molnar wrote:
> >
> > But the init task isn't supposed to be using the FPU in any case,
>
> Afaics, the same is true for any PF_KTHREAD/USER_WORKER thread?

I don't think so. We have various users of kernel_fpu_begin()/end()
that are very much about things like crypto and RAID xor memory copies
etc that will be used by kernel worker threads.

In fact, as far as I know, we'll use the FPU in the init_task too
thanks to irq_fpu_usable(). Look up the nft_pipapo_avx2_lookup()
function.

Maybe other patches removed that, I didn't check the context, but the
"init_task doesn't use FPU" doesn't actually sound true to me.

Linus