Received: by 10.213.65.68 with SMTP id h4csp540967imn; Thu, 22 Mar 2018 03:09:03 -0700 (PDT) X-Google-Smtp-Source: AG47ELtaTWjkJ+VEOSllL3djIRLOz2kjzY8fO14HViQqBK9DFSRsfeFevWpqgxfornm06dxpCZSI X-Received: by 10.99.177.7 with SMTP id r7mr17398790pgf.76.1521713343235; Thu, 22 Mar 2018 03:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521713343; cv=none; d=google.com; s=arc-20160816; b=aNMj/BrzBFVTU3v6aedjZfjbxWozcMLUdliSKaHHVwWCEiWHF6md992ifXINaA19U+ 6ui9hvUReXShAh7npfz33ZFGLcmBq1uwa/ERPtck4ae7GNl4hO9wi2xEsDUB3bqmT296 ddef6WIJHBhfy3mpTrEk4NKF9F3ItBWH/ztdZtXlWoGKyDCqlzPz9jHmbCo8loGLjHrE oQRl2cPYJ+P/hFfLyuaX4Tb+OtLbfYqrCnxBtO1dA9Ky4Cbk7BMloyfKENjUsmN3XAo+ fI9GBqtyOlSdxza/HEOjTpGqwTgRxJ1XLaHuQ0lMMl9nZlhinXhE/8vS/YNPyVc1QO9i yadA== 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=rsAnrZFY/tPoi/rgktL6cNqWN6ohp0bXLaGIqTiMOhM=; b=AfY92eKdPrp0YlATVfnY50DIuLD8Cm9BvFbHdawO5zhZt+DDTkLh4jlwGRSx1175fB 993byepAZRHewN+Nq88oSjLcXeyWcNy0mYT8Uu+5jFGuzb/fuGj1cGDO44Fhf89P9c4h DyGiTmQcs//uKBZzTOnaPIDT0y8o7n3VUei9elwbN7mJ2gU4r6B1di2vVRxaTTmQ+V4k ScpFwcNouFZnhWwJ2Co0r2PATCtyqOcXSLPhUJWDsxJVl+IkRDs6FflP/xBzslEZlMCY 1Gdwx62Kp49vNbjkif4FtljHfOg7vEeVlTzsklNb7O1K0X6kKcXnoehYeUmka8zic2F8 jFvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=JEUSvT7T; 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 1-v6si6253423plo.228.2018.03.22.03.08.48; Thu, 22 Mar 2018 03:09:03 -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=JEUSvT7T; 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 S1753421AbeCVJgs (ORCPT + 99 others); Thu, 22 Mar 2018 05:36:48 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36414 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752788AbeCVJgn (ORCPT ); Thu, 22 Mar 2018 05:36:43 -0400 Received: by mail-wm0-f66.google.com with SMTP id x82so14730771wmg.1; Thu, 22 Mar 2018 02:36:42 -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=rsAnrZFY/tPoi/rgktL6cNqWN6ohp0bXLaGIqTiMOhM=; b=JEUSvT7Tl0SyTqduYcQ1Mqj47XKXm1Gi0FYd5D4pYCkY8fxkEl7sk1U/tFxoxwxMwL 16Y1gBajpYSlkmufkYrZuLAPMtxa/qVNhxs6KLbJ24mzPTpYqiGbA/yKM80JYBYheRXP qMBgJUdac4CMG3RHG7C36A09XLI4plpMGNG0eo4fjcvxcx9ycBwNLzLmHo80nxLC17pL AaDkTB791ykEnvMnXY2gVZSZ6Jj7vWC8pNcYlP+uehwb7wC8XzMZ6u+0wWNcNU6oFfEa SUk1/3Tzbt1Zv/wQV/GHSmblGJ5cvkRRoK1VLsLDFNa1odD5Ntsk9qoY4Mfmx2iP8wHl 6VVw== 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=rsAnrZFY/tPoi/rgktL6cNqWN6ohp0bXLaGIqTiMOhM=; b=cvygxb/11W9TDYoQ3VXSxyTsNOprQodiaGkT9G7PZYZNvJcJjPJm6MgzzbGrOYlPcV AyxA+JcJVBuEsnD5SfgKgABmc0CzbOWxlNXguyfF50iw0qrnND+b2fLZ2YqVnzz+yfwS ryixiv6cfIsCMNH9I7CchQXovYqUfyEdlM+mR14TfzqkeVr0ofuoe+k5zk/6knOe2jEX ksP64+AMaKr2z83Qum5+ZLYu77QDq7bCsElae5UG3vxg6aujIN6nDOQPxmA+fdwF1zGX 18eygWWx5L09a+fBsKW2TKZF+kLeVsAgHMOHdqbW3s8olDzHfOnFBSDxa2X23PeTFrzq qJew== X-Gm-Message-State: AElRT7EzPNq0FyUdko85qBUtTezcWA4DGd3d8FrR0tFbvPmNHqDwO6dI Cz7UoFMtLGxyZHXVgJbfL/Q= X-Received: by 10.28.107.5 with SMTP id g5mr2829374wmc.133.1521711402144; Thu, 22 Mar 2018 02:36:42 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id i200sm4698773wmf.0.2018.03.22.02.36.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Mar 2018 02:36:41 -0700 (PDT) Date: Thu, 22 Mar 2018 10:36:39 +0100 From: Ingo Molnar To: Andy Lutomirski 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" , Peter Zijlstra , Fenghua Yu , Eric Biggers Subject: Re: [RFC PATCH 0/3] kernel: add support for 256-bit IO access Message-ID: <20180322093639.ierhvktujyfozb33@gmail.com> References: <7f0ddb3678814c7bab180714437795e0@AcuMS.aculab.com> <7f8d811e79284a78a763f4852984eb3f@AcuMS.aculab.com> <20180320082651.jmxvvii2xvmpyr2s@gmail.com> <20180321063256.bdqcpvgb3auxzwzk@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 * Andy Lutomirski wrote: > 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 :( For performance/scalability work we should just ignore the PTI overhead: it doesn't exist on AMD CPUs and Intel has announced Meltdown-fixed CPUs, to be released later this year: https://www.anandtech.com/show/12533/intel-spectre-meltdown By the time any kernel changes we are talking about today get to distros and users the newest hardware won't have the Meltdown bug. Thanks, Ingo