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

From: Len Brown
Date: Wed Jun 30 2021 - 11:21:14 EST


The latest proposal for kernel AMX support (updated today) is here:

https://lore.kernel.org/lkml/20210630060226.24652-1-chang.seok.bae@xxxxxxxxx/

The main challenge for AMX is not context switch performance.
Hardware recognizes INIT state (the common case) and skips that data
transfer when it is not needed.

The main challenge for AMX is compatibility. Specifically, user
signal stack growth.
The legacy ABI is that we put an uncompacted XSTATE image on the signal stack.
In the default stack case, this isn't a problem, but when a user
allocates an alternative signal stack,
the 8K of XSTATE growth that AMX can exceed what the user allocated.
The new system call tells the kernel that the application can handle it.
(it can do this by not using altsigstack, or by using the updated
stack size advertised
by glibc 2.34 and later, or some other means)