Received: by 10.213.65.68 with SMTP id h4csp1009302imn; Tue, 20 Mar 2018 23:36:21 -0700 (PDT) X-Google-Smtp-Source: AG47ELuIdj2YLBlsvOiii1+8Br8EOjTnX8DHpQS5ObV3/ka74l/JeUBU7zoarTwnlK1USNRpYTgq X-Received: by 2002:a17:902:14cb:: with SMTP id y11-v6mr19866701plg.23.1521614181137; Tue, 20 Mar 2018 23:36:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521614181; cv=none; d=google.com; s=arc-20160816; b=A/87xRHAvxIqMAY3Ljrgv2kq1F7oNCEFvwhGYXtsDJ/M5cSb0x936BHz7npcmU2gIs iH111rRwVzfUfjhaSMKjc2RSj5k0a0RcE8tabjbHHrdfFsYoQ34ZUepoAz0xlNN9/OPP eQAERww1QyTFFdrT3e+IQ4uI09D6tMBpei+9yk4YhmRFKVmw6hr5WmSu/Ggcg0DaGFRJ H5C8fjIrzNyiTNtDy6BKSMihOdt2gLm49euxI7GmccEy8uOGqs99pHUhQt07KHef5qDU Q82rXXXIdmCtMln9CXdr3NeuM102Dyy3EbCb2FiuhF3gsbycF2eJc9QyZJa41dJKqt1D ZVyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=tN4fLvjSbFwrsbji6b6OApDzZ9niogLCvNqY9ZWsWg0=; b=ZO5+cOf1L9eITjVfLUE9+rWWrtlgopJbPhikeeCXqFnu5trvUVQUzxceqyJQdHe2qW kjfffqgPoddgmJ+Y7JDPFvPfZnwVZVPHQwcwqLUu3yA+REJN5gbtuLYwsCDzm0kRYCeL QWT7MLa75AGkh1VtZY52CZJB4ugrX9iZyGaegPMbPqWvc9KKYr4rKNR/ZybcXzEaC07M H/TWU8fr+wVfB3N+QPXU8Bl3TCdhaNwofP8EkzYi1HlylX+S/i8MJkJSDnPPje5fOqrm deMT+ZDRvv+YOBTtMtmwH4SE4ubV7u7RymOM5O/FvsvVw3L6qzx6cCnB3Pmydbk+lYGx ubvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=oHQsy62h; 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 v11si2550325pff.189.2018.03.20.23.35.36; Tue, 20 Mar 2018 23:36:21 -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=fail header.i=@gmail.com header.s=20161025 header.b=oHQsy62h; 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 S1751615AbeCUGdI (ORCPT + 99 others); Wed, 21 Mar 2018 02:33:08 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:39081 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751319AbeCUGdE (ORCPT ); Wed, 21 Mar 2018 02:33:04 -0400 Received: by mail-wm0-f68.google.com with SMTP id f125so7666896wme.4; Tue, 20 Mar 2018 23:33:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=tN4fLvjSbFwrsbji6b6OApDzZ9niogLCvNqY9ZWsWg0=; b=oHQsy62hglNwZKSa0w37FwLFfbli3dGrRIuxgK+3WLdiYWqIYZjpAAvUQHiwnA27UJ pHYpV3OYEp2PwQ82IJN2Pod6HRvZdytA+1VcsYOFvoDItsAhWwkrpRVbMSG5MuK+wsE2 oRLPXhWE0VdRnpsCyw1vXaJA3Lg6BKQVoBZsVlCn/q5gC5xs3KMvn53WuVlbdwEVVDjb MHY1rx0KNtzPrr4Qr5SIAimzUKVy7H326FIQe7MHqEYivx5jxV/3tjorTkvWC+b4H398 +ClI+syWCaiEnqZtNct2NTwtmD8UvXoG52Gu+Uw746oJppeDHTDWkM8pqW4+1z62Wuhx cfhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=tN4fLvjSbFwrsbji6b6OApDzZ9niogLCvNqY9ZWsWg0=; b=UtwlMHMyWpe2OfhvGaJGLaDDhsnwB/sG4q8WdPm6u59kOH66wjMRwlyhXn12S9w5H1 AUAKZYPSRngfxRgOmRIvKepDgaMSVlBDIMmEL+uUOKxzcJPnEW2rlzrG3cx/hS8bRsS+ AeiBr4ctFIW/N0xq2+GNl5D8CB3NbU7JwZZSsfTShrGrGabn2XXJUwK4PPOe5/HpNsWG Wwg8UGxD/7UQH6hatrtK3y7P5KeZ35yQKlG1Xg5E3cLuPZPhcrJZW6TVfxnrtGnC3Aqc RnFxfdk0F4cRp6FC1Oi2kjZl1U7myUD1k2V5qQQK0EXyLQrOel+ZBfMbmQOA3A/Uy/h2 Lxfg== X-Gm-Message-State: AElRT7ErUe+tMe5S/nO49vrl2SLWhMG/OmLRE8mEFnUsx/76SoYB32CN LxPjrcXYlZltP1xMxneWzmU= X-Received: by 10.28.159.68 with SMTP id i65mr1727505wme.27.1521613980553; Tue, 20 Mar 2018 23:33:00 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id y30sm3781298wrd.83.2018.03.20.23.32.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Mar 2018 23:32:58 -0700 (PDT) Date: Wed, 21 Mar 2018 07:32:56 +0100 From: Ingo Molnar To: Linus Torvalds Cc: 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 Subject: Re: [RFC PATCH 0/3] kernel: add support for 256-bit IO access Message-ID: <20180321063256.bdqcpvgb3auxzwzk@gmail.com> References: <7f0ddb3678814c7bab180714437795e0@AcuMS.aculab.com> <7f8d811e79284a78a763f4852984eb3f@AcuMS.aculab.com> <20180320082651.jmxvvii2xvmpyr2s@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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. IFF it was safe to just use the vector unit then vector unit based crypto would be very fast for small buffer as well, and would be even faster for larger buffer sizes as well. Saving and restoring up to ~1.5K of context is not cheap. Thanks, Ingo