Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp860512img; Thu, 21 Mar 2019 10:26:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/xv0wAgbIYlbjvTUclPrJ0H2+bpQsGgPwcZOINQ95szi7IAZMwLN7KH2rnpGdpTtVNUzb X-Received: by 2002:a62:be08:: with SMTP id l8mr4406012pff.162.1553189182778; Thu, 21 Mar 2019 10:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553189182; cv=none; d=google.com; s=arc-20160816; b=gsdZJK9v+laP4ls2/BHw0vymUFC9aWl4ACjt1M6D0bOllD068qqZSu4L4qy5qmWTNW W9f9ssKrFA6J1f2D1JW+SU5RiCafO5T5RltUz9GuvaBn9OeXuzb0q2VwucldyGJeyh+G ZxTLPBgs7+gC6tpkBejfFDKkMf2Bbr7eReRh4MsQB2Zesu7G3rnLl4Y1jFHTMsXV98E1 AGdr9ZH5Jxf6ghA3y3rlNcjz7GD72+ceEunw0EmmvNxrHM9dEYXQper4NP1oGhNiTVw0 L2qtMOgvZax/FvCvKZgIoEw8HnJvmMm7zdkTwSK5Ylu9XoG4ahLxFDGuX87lidbT8FEj 2OAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=5Rg1jMDNYd7fIQ4YybunuLLrR6O7gubsKs5o3v483P0=; b=D4I0+wA9HT+ZYdsg2J4LvYnSSpfSbXpiA32ryLzhnnE3CUgLMzFENsFvvdtJOZm4ae BOU9e8B4UxKV7FZn7txwX51XicGtiwjnaj9qTusr9kuugvrQmvLucBxycUUWBWFB+iL1 kbsPSv4xnN2Wyr1Z+BpBdhcOlI+8sXMV22kXgWbvWbEQBlEwqNC4/UHryqWYRKwMcHjA l4ejXUcadbLBmvokzAObXfD11KOCx5RC1jGfNnecfbLE8YtiW5GjVSFV2jPZzEI+WeA2 jHnNCITbhIAKlvzEUNG3K2+TqyNZcVG2xKbfUwc59ZMFYxmSKtIGeLT4Hij7GTL5zpxJ ms1A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9si5185369pln.403.2019.03.21.10.26.07; Thu, 21 Mar 2019 10:26:22 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728695AbfCURZM (ORCPT + 99 others); Thu, 21 Mar 2019 13:25:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33692 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727829AbfCURZM (ORCPT ); Thu, 21 Mar 2019 13:25:12 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D41EF309E975; Thu, 21 Mar 2019 17:25:11 +0000 (UTC) Received: from [10.43.17.111] (unknown [10.43.17.111]) by smtp.corp.redhat.com (Postfix) with ESMTP id B26085D9C5; Thu, 21 Mar 2019 17:25:06 +0000 (UTC) Subject: Re: [PATCH 01/25] x86: Make SMAP 64-bit only To: Linus Torvalds , Peter Zijlstra Cc: Thomas Gleixner , Peter Anvin , 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 References: <20190318153840.906404905@infradead.org> <20190318155139.963285969@infradead.org> <20190318173657.GV6058@hirez.programming.kicks-ass.net> <20190318175135.GE6521@hirez.programming.kicks-ass.net> From: Denys Vlasenko Message-ID: Date: Thu, 21 Mar 2019 18:25:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 21 Mar 2019 17:25:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.