Re: Candidate Linux ABI for Intel AMX and hypothetical new related features

From: Borislav Petkov
Date: Mon Apr 19 2021 - 15:15:47 EST


On Mon, Apr 19, 2021 at 02:18:51PM -0400, Len Brown wrote:
> Yes, we could invent a new system call and mandate that it be called
> between #2 and #3. However, we'd still do #4 in response, so I don't
> see any value to that system call.

Lemme refresh your memory: there was a time when the kernel did lazy FPU
switching because tasks which really wanted to do that, would use FPU
insns and from the first use onwards, the kernel would shuffle an FPU
state buffer back'n'forth for the task, for the length of its lifetime.

Then glibc decided to use FPU in memcpy or whatever, leading up to
*every* task using the FPU which practically made us remove all that
lazy FPU switching logic and do eager FPU.

Back then that state was what, dunno, 1-2 KB tops.

Now imagine the same lazy => eager switch but with AVX or AMX or <insert
fat buffer feature here>.

All of a sudden you have *every* thread sporting a fat 8K buffer because
the library decided to use a fat buffer feature for it.

Nope, I don't want that to happen.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette