From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jason A. Donenfeld" Subject: Re: [PATCH v2 01/17] asm: simd context helper API Date: Sat, 1 Sep 2018 14:34:01 -0600 Message-ID: References: <20180824213849.23647-1-Jason@zx2c4.com> <20180824213849.23647-2-Jason@zx2c4.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Thomas Gleixner , LKML , Netdev , David Miller , Greg Kroah-Hartman , Samuel Neves , linux-arch@vger.kernel.org, Rik van Riel To: Andrew Lutomirski Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Sat, Sep 1, 2018 at 2:32 PM Andy Lutomirski wrote: > I tend to think the right approach is to merge Jason's code and then > make it better later. Even with a totally perfect lazy FPU restore > implementation on x86, we'll probably still need some way of dealing > with SIMD contexts. I think we're highly unlikely to ever a allow > SIMD usage in all NMI contexts, for example, and there will always be > cases where we specifically don't want to use all available SIMD > capabilities even if we can. For example, generating random numbers > does crypto, but we probably don't want to do *SIMD* crypto, since > that will force a save and restore and will probably fire up the > AVX512 unit, and that's not worth it unless we're already using it for > some other reason. > > Also, as Rik has discovered, lazy FPU restore is conceptually > straightforward but isn't entirely trivial :) Sounds good. I'll move ahead on this basis.