Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp905369img; Thu, 21 Mar 2019 11:24:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmpYDnsWu9r1DM5yD5Vrbu3xs0vT+xKCAuaWKWP2OaqVarr96MukK5I1n4DKnqpb1lEsNW X-Received: by 2002:a63:d84b:: with SMTP id k11mr4584603pgj.281.1553192650337; Thu, 21 Mar 2019 11:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553192650; cv=none; d=google.com; s=arc-20160816; b=EBKb8olbe2hkVcwVQD+ZQvuwhzRXT2kqLj+9Za/gob8Qe6eeDTvoLuY5ZDXxX5v5Lo Si7VtsrgDeF/QAJk1Eim8X/1NiLTbCuMogb2lOrNg+KTgXlKNLRP9Y6BLpIy+ix7mZra egI6Qa5Mblb5np2z07BsuDZRglhN5E+2TfSRtlLVGrmUIh2DSSUTPQHBffCWjYHUiEkT w86kOR1ToHuj9ALvdRlV8rMP+h/4QPWgAuPndCGVvDoPQDJ70DNzhTrDeO6zR/gpg/Ug E+zqeN4ojz2iKhrfgunc4BBwAKcXlo7mmQHfNGUvfHMMQAo1TSOeXTGzoIJGX7544rER g1hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8+0b9VVczCNu771OwGdqYsi7tYY4OdHda2cZMvBhZeE=; b=Dp5DENKrEWRUWBxr3B+2FoC2CRQPMUJSWRovBd2uSNTTlI22ZnC1QcnQSE+GR381kM Hyk3qGpPzF1tuAuMdrCUgMPrF7aMR0okJi5/8b4Ey1UVe3SA1oWJRvutP1c0yc4lN+Fs wJfi2S86jYS9k013t1C2dkW704Q7iJFYJZflLFcq/acqKRd/9wKtgxRc9eqCefquWuuD hNYBWj1dmnlVtaJ5DaS4tCkYjXmEcEqRG7O+9dMU3L7ZSmgNzqeyx1+ehE/mxosBu1FJ VzDoMlxsfGyaUXukELOB9pjk77DVBqg4Ix9KtJAZhH/AZgFVklKRECYSh4GUCpm3d10V eg+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=PcxwRvzf; 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 x3si4907282plo.202.2019.03.21.11.23.55; Thu, 21 Mar 2019 11:24:10 -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=pass header.i=@linux-foundation.org header.s=google header.b=PcxwRvzf; 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 S1728651AbfCUSV2 (ORCPT + 99 others); Thu, 21 Mar 2019 14:21:28 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:39492 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728131AbfCUSV2 (ORCPT ); Thu, 21 Mar 2019 14:21:28 -0400 Received: by mail-lf1-f67.google.com with SMTP id m13so5296316lfb.6 for ; Thu, 21 Mar 2019 11:21:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8+0b9VVczCNu771OwGdqYsi7tYY4OdHda2cZMvBhZeE=; b=PcxwRvzfg4AwdcOUXpwt2G91lZCl071d626fa3eMevbEDNpke9EqVLxuvHp8DjpcgQ yUDZBoPeWIKziXNUKDwVUAj/WWfCP/9CXl+PhrC32AzAQ7cJCHQdPjfs6HOOUwCN7TAK EKUm5UHxzRJfAmR/nGODH92ggFCQX6HwH5Wcg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8+0b9VVczCNu771OwGdqYsi7tYY4OdHda2cZMvBhZeE=; b=f0QkzYluTg9rn3ZXYhdPk5bbC8L6my5fhBXEha4hHsJpGhQ7R6X6DgSlegVw2mRpOt L72qk+IplNuySo2wc74PT/RVSW2qicmTzQMKNSVHGttL9blsSZIZt50/bz+f826BaBo+ fUAjRPL4JpvuP2gXSkXEQ2PRi2UIKj6cv5NeBXVOzoCBlUMV5IXsx22EDlUftJuWS0Dj gVnFST1jazJGRSdQ0YnmT82H/JsrSJwnEbfJ+mF5u+49DxBc7mYoGn0zizB0+OKppDM8 tuikoLFL+BepUa3AvX8/8SWN1YbQqoroxDduJ//V7xzVr9aOjW2vDZXRNdLQyYdQQBPf 1AFQ== X-Gm-Message-State: APjAAAVfb2poRcsRMDA1RYAdBxrLqqR5U48y4/mhNkRtyVgZrPpt3VU0 8YLJlg6TF2y2u+jfu2W1nn1OLQVJnP4= X-Received: by 2002:ac2:4355:: with SMTP id o21mr2848602lfl.85.1553192484472; Thu, 21 Mar 2019 11:21:24 -0700 (PDT) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id m4sm978169ljc.28.2019.03.21.11.21.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 11:21:22 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id v22so6123636lje.9 for ; Thu, 21 Mar 2019 11:21:21 -0700 (PDT) X-Received: by 2002:a2e:8585:: with SMTP id b5mr2781480lji.125.1553192481488; Thu, 21 Mar 2019 11:21:21 -0700 (PDT) MIME-Version: 1.0 References: <20190318153840.906404905@infradead.org> <20190318155139.963285969@infradead.org> <20190318173657.GV6058@hirez.programming.kicks-ass.net> <20190318175135.GE6521@hirez.programming.kicks-ass.net> In-Reply-To: From: Linus Torvalds Date: Thu, 21 Mar 2019 11:21:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 01/25] x86: Make SMAP 64-bit only To: Denys Vlasenko Cc: Peter Zijlstra , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 21, 2019 at 10:25 AM Denys Vlasenko wrote: > > > > > 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. It may have been an artifact on just some older CPU's. I have this distinct memory of popf that changed IF being more expensive, but maybe that was the Pentium 4 days. Or maybe it's just that my memory is garbage. Linus