Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752272AbcD3Hxu (ORCPT ); Sat, 30 Apr 2016 03:53:50 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36289 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751856AbcD3Hxt (ORCPT ); Sat, 30 Apr 2016 03:53:49 -0400 Date: Sat, 30 Apr 2016 09:53:44 +0200 From: Ingo Molnar To: Dave Hansen Cc: Andy Lutomirski , Yu-cheng Yu , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "linux-kernel@vger.kernel.org" , Andy Lutomirski , Borislav Petkov , Sai Praneeth Prakhya , "Ravi V. Shankar" , Fenghua Yu Subject: Re: [PATCH v4 0/10] x86/xsaves: Fix XSAVES known issues Message-ID: <20160430075343.GA23063@gmail.com> References: <5723A353.7060209@linux.intel.com> <20160429195741.GA15402@test-lenovo> <5723BE1F.7040300@linux.intel.com> <20160429200709.GA15412@test-lenovo> <5723C6A7.4020704@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5723C6A7.4020704@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 767 Lines: 22 * Dave Hansen wrote: > But I also think it would be pretty nice if 'ls' didn't pay the 2k cost to have > AVX-512 state if it's not using AVX-512. [...] A C library might decide to use AVX-512 memset(). RAM is cheap, while allocation complexity, especially in the kernel, has various other costs. I mean, we should not worry about per thread allocation sizes that can be compared to the kernel stack size. We can still use the compacted area handling instructions, because presumably those are the fastest and are also the most optimized ones? But I wouldn't use them to do dynamic allocation: just allocate the maximum possible FPU save area at task creation time and never again worry about that detail. Ok? Thanks, Ingo