Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp902447img; Thu, 21 Mar 2019 11:20:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6GG/ZGtCIlWMNTeiwyBZ3oFhE9Vd4MAIhFyCtcwLNl3MpDzJv1qWJxr5aTa2eW+HvtT4N X-Received: by 2002:a63:78ca:: with SMTP id t193mr4662275pgc.253.1553192405521; Thu, 21 Mar 2019 11:20:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553192405; cv=none; d=google.com; s=arc-20160816; b=VRU+MqweRpVp79xXvhDC8K4VtwDRO0FFkn2Lr8IJAR3MLjgZaxgeXF+HRy/70oEr3q UPNMWpfnVdEraCExkQG0F3ES/1EF6JaaF++9GH4NR12chYCGHuaG3+PoKG7r50VpQNgG II0P6NVsbZAZwdjEkQ1MAe7kMDOKlZELC7zMmFh72mcg7Sx9Ie02kbIV5kAfuG+LD/8n 0hW5Ge5p9bA1UI5NwvDLPdQOZJHd5ImADJlKnyHjjFlnJ+3Els7jZSMGZOl2ooRA5USf x9dulEqyjMt2CbbQrQ7dDG+CDOKYdfBEDYa2Nun5Tem2W4k88d73h9XVFP+ZnGjwJJCG j71A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date; bh=p/Zj6nlQr9XrXn6wVpzq1tkOPiBuQ4kv/3kjSt7wUDI=; b=cZUsa8aOqvR8fFEzJUgaSQYzFirQd+arVCtGh9hfUen8WrSamitrDohKo+KRh6GJS/ g3ua27RpCvPMAeWOvWC/LdCb1/3W//UhEDu0N2MImogQUq3SeT8iciiSbw5L6ApQBr13 E+YwzynHUNlQ+UMI3IuI6+eJnrNEmQHY0eZ9+UuWkuNWKKIoFKlPGR53a0JD5m7B0tII 3t9npQ6Qg0PSIgLAo66OJgZ7mVhunn0WzF484iH7O2+3EWDE7P8Zzajf+A2FbgopbUpU ewWWlatOE4KWLj4W+9UFnP80md3Z8q3jy8DPkdEux4r4EQkjoDg9BH78GacCXzeKkbFE zwBQ== 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 7si816623pfh.34.2019.03.21.11.19.50; Thu, 21 Mar 2019 11:20:05 -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 S1728622AbfCUSTC convert rfc822-to-8bit (ORCPT + 99 others); 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.