From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0DBAC43381 for ; Thu, 21 Mar 2019 18:19:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 88D4821874 for ; Thu, 21 Mar 2019 18:19:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728629AbfCUSTC convert rfc822-to-8bit (ORCPT ); Thu, 21 Mar 2019 14:19:02 -0400 Received: from terminus.zytor.com ([198.137.202.136]:40295 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbfCUSTB (ORCPT ); Thu, 21 Mar 2019 14:19:01 -0400 Received: from [IPv6:2607:fb90:3258:198e:38c6:f38f:7326:f16d] ([IPv6:2607:fb90:3258:198e:38c6:f38f:7326:f16d]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id x2LII9Nu235972 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 21 Mar 2019 11:18:10 -0700 Date: Thu, 21 Mar 2019 11:18:05 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: <20190318153840.906404905@infradead.org> <20190318155139.963285969@infradead.org> <20190318173657.GV6058@hirez.programming.kicks-ass.net> <20190318175135.GE6521@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH 01/25] x86: Make SMAP 64-bit only To: Denys Vlasenko , Linus Torvalds , Peter Zijlstra CC: Thomas Gleixner , Julien Thierry , Will Deacon , Andy Lutomirski , Ingo Molnar , Catalin Marinas , James Morse , valentin.schneider@arm.com, Brian Gerst , Josh Poimboeuf , Andrew Lutomirski , Borislav Petkov , Linux List Kernel Mailing , Dmitry Vyukov , Steven Rostedt From: hpa@zytor.com Message-ID: <33D32634-51DC-426D-BE4A-F78B862760D5@zytor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On March 21, 2019 10:25:05 AM PDT, Denys Vlasenko wrote: >On 3/18/19 7:10 PM, Linus Torvalds wrote: >> On Mon, Mar 18, 2019 at 10:51 AM Peter Zijlstra > wrote: >>> >>> How about I do a patch that schedules EFLAGS for both 32bit and >64bit, >>> mark this for backporting to infinity. >>> >>> And then at the end, after the objtool-ac bits land, I do a patch >>> removing the EFLAGS scheduling for x86_64. >> >> Sounds sane to me. >> >> And we can make it AC-conditional if it's actually shown to be >visible >> from a performance standpoint. >> >> But iirc pushf/popf isn't really that expensive - in fact I think >it's >> pretty cheap when system flags don't change. > >I did not see evidence of this. In my testing, >POPF is always ~20 cycles, even if popped flags are identical to >current >state of flags. I think you will find that if you change system flags it is much slower. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.