Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp606925imm; Sat, 1 Sep 2018 13:33:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZIrA/dX6btuO0+62cHcJRGO05e4Um5O6XbyxNXLCQCvnrjQjyT3MG0bhg17nGCBkCy8jeQ X-Received: by 2002:a62:b604:: with SMTP id j4-v6mr22116438pff.199.1535834038666; Sat, 01 Sep 2018 13:33:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535834038; cv=none; d=google.com; s=arc-20160816; b=j0Ny6CEMOqAhqsKZ6iaL1Cc1YOVtk3S8jd06tFPD5SRH7FjBB1tTn79FkPZCqgndbW difOuhjkAggbRtlkucn4WKdin72pO9go66Ik89VT4iR5/TCv9YTmjVG+0+dtPDOWShwa sorxQ/9iZ6+DD747FInzg6Ag8X6c2pLS5QNERlNk9ygP7SohPxoKrk8ds5ow+KeDLinR lp3YNZOgeINz2C5tYEPq6I++ObrB2iPJFRHFHFjtr/VR8t2m76udfrgmySx3o92m+KnN bZemVHrirIU97rlsqS5IaIDyv8lTt8OcXLxEWibBC4ADx+mmu0IWx3mtieG9Ug3mLZvZ BZPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=wLC40fiS+KQCajf+HJ1DDGDRqMImtUQIoNpZDX6/+uU=; b=YAs44J6avqrpgsuQF1dnu4uOLD2uJ36S65walFg82Q8fji8Z7SyTs5TkTsTRh5ojiC SXZWtMNjVLoUjVSbZBtZ+9vhZY4Aqoeyyh/n4JcmTx3ngky2lnQAh8byvMG4V96NrruG kwnkyTVRXd7y5K6eLjX8xuLoSqwat4WTQ1bOp11djLnBSZmljqRVjIB7qGa0vigvdGSu iIEechCtdd2JthL8p6nUWepzufUCUFvw5KxwDrFqxHJ4xkL6JLgMm/Ny4cnu0W/tXBgr 2DLqQG6Acvkn/vprmIvctz592wclRQzyjKL47wSBxSM30Zwus2GzEZp/AlK/EKU9WUPr IMTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2uCmjqt7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64-v6si13742382ply.375.2018.09.01.13.33.42; Sat, 01 Sep 2018 13:33:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2uCmjqt7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727255AbeIBApi (ORCPT + 99 others); Sat, 1 Sep 2018 20:45:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:49898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727000AbeIBApi (ORCPT ); Sat, 1 Sep 2018 20:45:38 -0400 Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 47C1920843 for ; Sat, 1 Sep 2018 20:32:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1535833950; bh=mcCInMwE+RcKAtqp4f7g/o+m2GdTLajIZ/OZ+4/8aJc=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=2uCmjqt7A8rNqIvumkENn/XQBTJ/xmEWqCjSZ/tIqTLdsIaV5q6PGg15X9KtDnWqI wc9dlEfL1zClBN0Gk/EDbWqrADgBBCvKL+ERi4Af1PHzM49HFPijtHeOABUyLBTS4s ScOSeUxEmAxG9QN6vMliJ1jyB9CRl70Ws8rJHW1U= Received: by mail-wm0-f54.google.com with SMTP id c14-v6so8074011wmb.4 for ; Sat, 01 Sep 2018 13:32:30 -0700 (PDT) X-Gm-Message-State: APzg51AKJp8nVF9bIvY+P9Vx/dtqOfXlEto2LKlxvSCGKpFyL+uPd3hI P0wCDrIU43jfREE2VbP+LzOMmapMGEMiy2AUvX5kag== X-Received: by 2002:a1c:3413:: with SMTP id b19-v6mr1448236wma.21.1535833948761; Sat, 01 Sep 2018 13:32:28 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:9045:0:0:0:0:0 with HTTP; Sat, 1 Sep 2018 13:32:08 -0700 (PDT) In-Reply-To: References: <20180824213849.23647-1-Jason@zx2c4.com> <20180824213849.23647-2-Jason@zx2c4.com> From: Andy Lutomirski Date: Sat, 1 Sep 2018 13:32:08 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 01/17] asm: simd context helper API To: "Jason A. Donenfeld" Cc: Thomas Gleixner , LKML , Netdev , David Miller , Andrew Lutomirski , Greg Kroah-Hartman , Samuel Neves , linux-arch , Rik van Riel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 1, 2018 at 1:19 PM, Jason A. Donenfeld wrote: > Hey Thomas, > > I'd like to move ahead with my patchset and make some forward progress > in LKML submission. If you've got something brewing regarding the FPU > context on x86 and ARM, I'm happy to wait a bit longer so as to build > on that. But if that is instead a far-off theoretical eventual thing, > perhaps it's better for me to move ahead as planned, and we can switch > to the superior FPU semantics whenever you get around to it? Either > way, please let me know what you have in mind so our plans can stay > somewhat sync'd. 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 :) --Andy