[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210630124111.GC23648@1wt.eu>
Date: Wed, 30 Jun 2021 14:41:11 +0200
From: Willy Tarreau <w@....eu>
To: "Enrico Weigelt, metux IT consult" <lkml@...ux.net>
Cc: Florian Weimer <fweimer@...hat.com>, Len Brown <lenb@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Dave Hansen via Libc-alpha <libc-alpha@...rceware.org>,
Dave Hansen <dave.hansen@...el.com>,
Rich Felker <dalias@...c.org>,
Linux API <linux-api@...r.kernel.org>,
"Bae, Chang Seok" <chang.seok.bae@...el.com>,
X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
Kyle Huey <me@...ehuey.com>, Borislav Petkov <bp@...en8.de>,
Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Keno Fischer <keno@...iacomputing.com>,
Arjan van de Ven <arjan@...ux.intel.com>
Subject: Re: Candidate Linux ABI for Intel AMX and hypothetical new related
features
On Wed, Jun 30, 2021 at 02:22:19PM +0200, Enrico Weigelt, metux IT consult wrote:
> Ah, now I'm beginning to get it:
>
> * this feature needs to be initialized first, before it can be used
> * on first use (when not initialized yet), it traps into the kernel
> * we don't want to always initialize it at boot
>
> Correct ?
Not exactly. It's available but comes with a huge context-switch
cost for each task using it.
> What I'm wondering: why shall the process explicitly ask for it and
> why isn't the initialization be done either on bootup or on first use ?
The whole discussion about the pros and cons is archived here:
https://lore.kernel.org/lkml/CALCETrW2QHa2TLvnUuVxAAheqcbSZ-5_WRXtDSAGcbG8N+gtdQ@mail.gmail.com/
> I'm still claiming already this old model is a horrible misdesign and
> (most of) the extensions made over the decades are anything but well
> designed - there had been many changes to do it much, much better.
> For example there would have been ways to introduce new opcodes in a way
> that they can be easily emulated in kernel or userland, w/o going
> through a full trap.
It's not a matter of opcodes but of context switch cost which not
everyone wants to inflict to every single task that opportunistically
uses these instructions without realizing what this subsequently
implies for the rest of their life. All this is discussed in the
thread above. I don't remember seeing anybody criticize the choice
of instruction encoding hence it's irrelevant to this discussion.
Hoping this helps,
Willy
Powered by blists - more mailing lists