Received: by 10.213.65.68 with SMTP id h4csp1360030imn; Wed, 21 Mar 2018 08:49:35 -0700 (PDT) X-Google-Smtp-Source: AG47ELvtVFNQxVyowBp2bbzUlwi5/LHqd17OuutonTwjjfPAg+f3bivdwgoNtTGmxtmPswSe3mf3 X-Received: by 10.99.4.202 with SMTP id 193mr13237540pge.409.1521647375710; Wed, 21 Mar 2018 08:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521647375; cv=none; d=google.com; s=arc-20160816; b=dG1JHmzvc1gV+EZifcIf3qDiEQee2DO+SoXDL37sPWY86Xt5K2kxfsOxucsJmkOGAv lJpEP8oP+9YVE3qTOS2uMzCbgE5RlfEgnzorHnVf2l0KRTmPsu2QfBExrudmaoNZ4q44 p71ut3wd02SQ1QAtIXo2eK289Sn79RnTi6HXqukQXuGmWwC9nf0xCH09Bau8uekltX+j uBTPmZQSgCZ5Eejr+4qfzeR05gLtzIqGD4sDaNWfqwM3vdf77f7AX9H2AJJ5wyxnrT3/ Vh0CRLc70SmiXpCwSjD8uAKGok+XCSkiQopeBbL/vBAIwS8vZppUj5xtCYGIY7FqOrZU jgAQ== 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:dmarc-filter :arc-authentication-results; bh=1tEif1LjI/FDlTy/mgiCf/bX2TkIFrmaYCQjX0d6JkA=; b=h6lJSofSLpO6svsqmPa77N9APha3Q3ZvUw3+cOlMtwvrTWpV/jEZM5AT2V6B7V3UyA o4oHnqlQOTV+jdpMKnJ3pxqCJ1Fh6I+0NjR5r2F+vi9rc99rHNUzbkbk+DUOiKs7fOLQ pg+a1JSrh966Dfy8LcU9/VyBENq+nXmcw9aj5x/vtEC7zSQN/gNI0rQeLFueuYKouTp+ R/l19TVY8zyrBHYD40z0ACAV1+BXWDQihzncv9np9iTJ/uX6h3bgOFxy3QFitM74um5Z z2py7dAbHje38Lkfcx7wXHcgX3GKUFdR5WJF9ml3Z3HK++7Ynpoq1Mr1rA+6cl+jH8Fv h5Zw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m61-v6si4200876plb.63.2018.03.21.08.49.20; Wed, 21 Mar 2018 08:49:35 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752725AbeCUPq0 (ORCPT + 99 others); Wed, 21 Mar 2018 11:46:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:36564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752409AbeCUPqQ (ORCPT ); Wed, 21 Mar 2018 11:46:16 -0400 Received: from mail-it0-f48.google.com (mail-it0-f48.google.com [209.85.214.48]) (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 65DBE21840 for ; Wed, 21 Mar 2018 15:46:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65DBE21840 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org Received: by mail-it0-f48.google.com with SMTP id z7-v6so16631712iti.1 for ; Wed, 21 Mar 2018 08:46:16 -0700 (PDT) X-Gm-Message-State: AElRT7FhICfz41HgWpbWBCdQJds5xFHjF0qPKT0AOYdQqObFLdarmu7Q mOG0fgX1xCLbwnHVgGbPnSnS4ZQ00CvVaUFQ/1CA4Q== X-Received: by 2002:a24:818a:: with SMTP id q132-v6mr4506208itd.123.1521647175655; Wed, 21 Mar 2018 08:46:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.137.70 with HTTP; Wed, 21 Mar 2018 08:45:55 -0700 (PDT) In-Reply-To: <20180321063256.bdqcpvgb3auxzwzk@gmail.com> References: <7f0ddb3678814c7bab180714437795e0@AcuMS.aculab.com> <7f8d811e79284a78a763f4852984eb3f@AcuMS.aculab.com> <20180320082651.jmxvvii2xvmpyr2s@gmail.com> <20180321063256.bdqcpvgb3auxzwzk@gmail.com> From: Andy Lutomirski Date: Wed, 21 Mar 2018 15:45:55 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 0/3] kernel: add support for 256-bit IO access To: Ingo Molnar Cc: Linus Torvalds , Thomas Gleixner , David Laight , Rahul Lakkireddy , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "mingo@redhat.com" , "hpa@zytor.com" , "davem@davemloft.net" , "akpm@linux-foundation.org" , "ganeshgr@chelsio.com" , "nirranjan@chelsio.com" , "indranil@chelsio.com" , Andy Lutomirski , Peter Zijlstra , Fenghua Yu , Eric Biggers 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 Wed, Mar 21, 2018 at 6:32 AM, Ingo Molnar wrote: > > * Linus Torvalds wrote: > >> And even if you ignore that "maintenance problems down the line" issue >> ("we can fix them when they happen") I don't want to see games like >> this, because I'm pretty sure it breaks the optimized xsave by tagging >> the state as being dirty. > > That's true - and it would penalize the context switch cost of the affected task > for the rest of its lifetime, as I don't think there's much that clears XINUSE > other than a FINIT, which is rarely done by user-space. > >> So no. Don't use vector stuff in the kernel. It's not worth the pain. > > I agree, but: > >> The *only* valid use is pretty much crypto, and even there it has had issues. >> Benchmarks use big arrays and/or dense working sets etc to "prove" how good the >> vector version is, and then you end up in situations where it's used once per >> fairly small packet for an interrupt, and it's actually much worse than doing it >> by hand. > > That's mainly because the XSAVE/XRESTOR done by kernel_fpu_begin()/end() is so > expensive, so this argument is somewhat circular. If we do the deferred restore, then the XSAVE/XRSTOR happens at most once per kernel entry, which isn't so bad IMO. Also, with PTI, kernel entries are already so slow that this will be mostly in the noise :( --Andy