[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <37833625-3e6b-5d93-cc4d-26164d06a0c6@intel.com>
Date: Thu, 20 May 2021 14:13:15 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>, Len Brown <lenb@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>, Willy Tarreau <w@....eu>,
Andy Lutomirski <luto@...nel.org>,
Florian Weimer <fweimer@...hat.com>,
"Bae, Chang Seok" <chang.seok.bae@...el.com>,
X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
Linux API <linux-api@...r.kernel.org>,
"libc-alpha@...rceware.org" <libc-alpha@...rceware.org>,
Rich Felker <dalias@...c.org>, Kyle Huey <me@...ehuey.com>,
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 5/20/21 1:54 PM, Thomas Gleixner wrote:
>> Regarding error return for allocation failures.
>>
>> I'm not familiar with the use-case where vmalloc would be likely to fail today,
>> and I'd be interested if anybody can detail that use-case.
> It does not matter whether it's likely or not. Unlikely simply does not
> exist at cloud-scale.
Len, I may have led you astray in some of our discussions on this topic.
Here are the cold hard facts:
* vmalloc() can fail (the memory.kmem cgroup limit is probably the most
likely place to be exposed to this)
* vmalloc() failure in a fault (like #NM) will result in SIGSEGV
* vmalloc() failure in a syscall can be handled with -ENOMEM
In some of our discussions, I told you that reasonably-sized vmalloc()s
don't practically fail and that we shouldn't be concerned with failure
for our vmalloc()-in-#NM use-case. In other words, I'm OK with crashing
apps at the point that vmalloc() is failing.
However, Thomas was pretty clear that he's not OK with that. To
paraphrase: if we can avoid expanding the scope of where memory
allocation failures result in SIGSEGV, we should do it.
While I don't *entirely* agree that it's worth it, I can respect
Thomas's opinion here. It leads me in the direction of wanting to
drive dynamic xstate vmalloc()s from an explicit syscall ABI.
My apologies if I sent the AMX support on an unproductive tangent here.
Powered by blists - more mailing lists