Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4365262img; Tue, 26 Mar 2019 08:04:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQH9cpamNeDbT8kD4FJdZvrP0lVWY/At6CeoifraDSxrX+Oof5yTjgoop8cbOI+iAwLjo5 X-Received: by 2002:a62:58c7:: with SMTP id m190mr30116844pfb.4.1553612656433; Tue, 26 Mar 2019 08:04:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553612656; cv=none; d=google.com; s=arc-20160816; b=UlBr0gBU1uV19leQfHnmAu6UU2OoqF7KiM3pyV13I44Mzz5Fdc3evzQGvtHIjfbNWh y+t8X2DLgk1M6++tPaUsYsd2lveeaVh9vj0xqHXXPeFaNZHMgsQMRdIrMN0R7qdM8jsF LJulfTJyWJI+9qZvr5zs+zlrDdST/sSv6BYY57yRbNR301cm9wODK7czjdXQHP6Y5HVu bDYu/joG3cqgdz+i+d5O2ijC+Q+sD895lhgdvqBJUnpNWNJpqLsndoAxG06GIRkqH7nO k5NobJ+pYMjcoELx205tmOBnxq0SrOr+ICazuhhtWIMc92kMZNbpMdinjWYIiwJjeV1/ CwLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=xP3msvRSi53A1auCLo3VwMWSf/rKTS9lHucl0NkX34M=; b=v13W4zOX0fjhtWg2VY8p2rYxUWoPrIpDQkfsy32s/xR8+Yo1gAji7WAmpp9eBCeyWA y5X9O3b1xnVFDLWRa/XrkWO+DFMO4tP/VC0RjLKsdKHcFpifUxUIoOfC0oDhIkrmJQO2 1cJQQWj+Zj9JM9YrYjtUrLjgWgaW1eoZMOeOe7+0zaSB4/P2Lm9iXveAIoDkp4pdTqAn KDjp0VkEZaK5x7AEhLn0nADq+A+2GOYdsPl2jxWgl/0bGPvPQTjXh1XpNgO6D7uE++o0 Q3a9041WKg8c28i08RYExD3n0ChprOkn6qeVSeRjI8uDrBNwgi33Bp+YJpuC/2Ob1OSf 2azw== 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 m30si12903233pgb.493.2019.03.26.08.04.00; Tue, 26 Mar 2019 08:04:16 -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 S1731850AbfCZPBm (ORCPT + 99 others); Tue, 26 Mar 2019 11:01:42 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:48576 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726278AbfCZPBl (ORCPT ); Tue, 26 Mar 2019 11:01:41 -0400 Received: from p5492e2fc.dip0.t-ipconnect.de ([84.146.226.252] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1h8na0-0007Wb-TL; Tue, 26 Mar 2019 16:01:33 +0100 Date: Tue, 26 Mar 2019 16:01:32 +0100 (CET) From: Thomas Gleixner To: Andi Kleen cc: "Chang S. Bae" , Ingo Molnar , Andy Lutomirski , "H . Peter Anvin" , Ravi Shankar , LKML , Andrew Cooper , x86@kernel.org, Linus Torvalds , Greg KH , Arjan van de Ven Subject: New feature/ABI review process [was Re: [RESEND PATCH v6 04/12] x86/fsgsbase/64:..] In-Reply-To: <20190326003804.GK18020@tassilo.jf.intel.com> Message-ID: References: <1552680405-5265-1-git-send-email-chang.seok.bae@intel.com> <1552680405-5265-5-git-send-email-chang.seok.bae@intel.com> <20190326003804.GK18020@tassilo.jf.intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andi, On Mon, 25 Mar 2019, Andi Kleen wrote: > > So on user space to kernel space transitions swapping in kernel GS should > > simply do: > > userGS = RDGSBASE() > > WRGSBASE(kernelGS) > > This would also need to find kernelGS first, by doing RDPID and then > reading it from memory in the right index > (which might be a full cache miss if you're unlucky) I'm well aware of that. > SWAPGS will be a lot faster, especially in these rare worst cases > because it has all its state inside the CPU. The well known 'will/might/could/should' word weaseling is not solving anything. If you want to advocate the more complex design of mixed SWAPGS/FSGSBASE then provide numbers and not hand-waving. Numbers of real-world workloads, not numbers of artificial test cases which exercise the rare worst case. Yes, it's extra work and it's well spent. If the numbers are not significantly different then the simpler and consistent design is a clear win. According to the changelog on which I reacted you seem to have investigated that already. Let me cite it again: > Accessing user GSBASE needs a couple of SWAPGS operations. It is > avoidable if the user GSBASE is saved at kernel entry, being updated as > changes, and restored back at kernel exit. However, it seems to spend > more cycles for savings and restorations. Little or no benefit was > measured from experiments. So little or no benefit was measured. I don't see how that maps to your 'SWAPGS will be a lot faster' claim. One of those claims is obviously wrong. Aside of this needs more than numbers: 1) Proper documentation how the mixed bag is managed. 2) Extensive comments explaining the subtle inner workings and caveats. 3) Proper changelogs. You have a track record of not caring much about either of these, but I very much care for good reasons. I've been bitten by glued on and half baked patches from Intel in the past 10 years so many times, that I'm simply refusing to take anything which is not properly structured and documented. Especially not when it is touching sensitive areas like this and also has an impact on the user space ABI. > BTW you managed to only review after Chang went on a long vacation. I'm terribly sorry about that. I'll try to adjust my own schedules and workflow to Intel employees vacation plans in the future. > > I don't understand why it takes that long to review these changes > It's one of the largest performance improvements for the context > switch and the NMI in many years plus gives a new free register > to user space, but it only makes progress at a glacial pace. > The original patches for this were posted in 2016. > Care to look at the real history of this: 11/2015: First patch-set posted by you, which was rejected on technical grounds So this so important feature was in limbo for 20 months until Luto picked it up again. That's surely the fault of the x86 maintainers, right? 07/2017: Discussion about ABI considerations initiated by Andy Lutomirksi. And it takes another 8 month until patches come around: 03/19/2018: V1 from Chang. Reviewed within days 2 month gap caused by Intel: 05/31/2018: V2 Request from Andy to split the set 06/04/2018: Base-V1 The first chunk of changes. 06/06/2018: Base-V2 Slight modifications 06/07/2018: Base-V3 Slight modifications. Review on 08/18 06/20/2018: Base-V4 Review on 06/22 06/27/2018: Base-V5 2 month gap caused by busy maintainers. You know what they were busy with at that time, right? Chasing subtle bugs in the so perfect L1TF patches which were thrown over the fence by you and dealing with the Intel induced speculation crap to have a consistent and maintainable mitigation including proper documentation. 08/23/2018: Base-V5 Resend. Review on 9/14 09/18/2018: Base-V6. Merged 10/08 10/23/2018: Full-V3. Review immediate 10/24/2018: Regression detected caused by Base-V6 The so perfect base patch set caused a regression and it takes more than a month to fix it properly: 10/30/2018: Fix-V1. Broken 10/31/2018: Fix-V2. Broken 11/01/2018: Fix-V3. Broken 11/14/2018: Fix-V4. Broken 11/15/2018: Fix-V5. Broken 11/26/2018: Fix-V6. Finally 2 months to address the Full-V3 feedback: 01/16/2019: Full-V4. Change request 02/01/2019: Full-V5. Review immediate 02/13/2019: Full-V6. 1 month gap caused by busy maintainers. Ash on my main... 03/15/2019: Full-V6 resend So just to put this straight: Out of 40 month since the first post in 11/2015: 20 months nothing happened from Intel side 8 months consumed to produce the next set 1 month to fix a regression 2 months consumed to react on review feedback ---------------------------------------------- 31 months versus: 2 months maintainers dealing with Intel crap 1 month maintainers being busy The rest is the usual review/re-post ping pong delay which sums up, but from the larger gaps more than 75% are Intel induced and 7% maintainer induced. It's pretty obvious why it takes that long, right? Back to the current version of patches: Putting the design question aside. Even if the mixed SWAPGS/FSGSBASE thing is the right thing to do, the patch set is not acceptable in the current form. Again for the record: 1) Lack of documentation. 2) Lack of proper justification and explanation of the design. 3) Patches doing different things at once. 4) A yet to be explained inconsistency in the NMI code. 5) Pointless and mindless local_irq_save/restore() in switch_to() which this performance important patch set tries to optimize. I as a maintainer don't have to decode all of the above from a jumble of complex patches, right? Just for the record: You can rant until you're blue in the face, it's not going to change the fact that this stuff is not ready. It's neither changing the fact that all of the above could have been addressed by Intel _before_ posting V6. You very well know the expectations and it's not my personal pet peeve, it's clearly documented in Documentation/process/*. I'm dead tired of your unfounded complaints and of your permanent refusal to collaborate. Keep that up and the last x86 maintainer who was willing to deal with you in the past 10 years will finally open up a reserved slot in his email filters to /dev/null. Thanks, Thomas