[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d3d513b-77d6-e2e2-779e-ff3ea33deba3@intel.com>
Date: Mon, 3 May 2021 06:43:54 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Florian Weimer <fweimer@...hat.com>, Len Brown <lenb@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>, Willy Tarreau <w@....eu>,
Andy Lutomirski <luto@...nel.org>,
"Bae, Chang Seok" <chang.seok.bae@...el.com>,
X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
linux-abi@...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>
Subject: Re: Candidate Linux ABI for Intel AMX and hypothetical new related
features
On 5/2/21 10:18 PM, Florian Weimer wrote:
>> 5. If the feature is enabled in XCR0, the user happily uses it.
>>
>> For AMX, Linux implements "transparent first use"
>> so that it doesn't have to allocate 8KB context switch
>> buffers for tasks that don't actually use AMX.
>> It does this by arming XFD for all tasks, and taking a #NM
>> to allocate a context switch buffer only for those tasks
>> that actually execute AMX instructions.
> What happens if the kernel cannot allocate that additional context
> switch buffer?
Well, it's vmalloc()'d and currently smaller that the kernel stack,
which is also vmalloc()'d. While it can theoretically fail, if it
happens you have bigger problems on your hands.
Powered by blists - more mailing lists