Received: by 10.223.176.5 with SMTP id f5csp846442wra; Wed, 7 Feb 2018 08:26:41 -0800 (PST) X-Google-Smtp-Source: AH8x227QhiW9bZrgvG/K79Xmeyn4XlDhrG4Ayy7f85RdyoaSsV9n3KaZQ3Z08U67O34aJaSJ8cnG X-Received: by 10.98.0.17 with SMTP id 17mr6438253pfa.63.1518020801469; Wed, 07 Feb 2018 08:26:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518020801; cv=none; d=google.com; s=arc-20160816; b=omNk2ZltW3155GILd81WsljWmcRrZqGAZjibFzSUK36OINnRjUd0Dcz6a52gh3vzXn hmktcR5oTSd1zEBPgSqKln0egBMw4VYeVfDaZJ7YXZibTezxVIzMIE/MnAlhnsX558pQ +QWQ86iVUqjjtu6Lz9fix0mRAvKNG4C0lcDEL1SWh25YK+TDfPZYgZzmjBSQQx0eUNzU Db4nvzANrW7E3eBMSqsUIjY7c1A/RyuEeAASXCI5sKSEPllVLI+WVnjyvNwkIFe/IbWy yBHtYCmstL6WoDZ9nYfWPx5e8lQoL93uU22BUtj0AWKswBKA6EcY9hP6cq1TUDw5W9bQ EaZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=7BISG5o92woQdDp7D5U27vtit9tKXR5pOez/xmaMFdo=; b=r7QpQP0i7HRBsewTbMWivdVW79KCAItV/LHYcKh4hTga23jJHGMYtZ1bOeQXzPHrzk dJn+LjvX9sfIQJLaS2nfgap09/F0Be24f696A9IeH2pwSqDvjknAIqWZ40K6cFZxRg5L BaWkn5WYuT6EYyJ4E9dXel7L2xXzx7CWSBpfwI6jGa5/T5GMbL/gSaTuVEMbPpGyDfsk UGveU4KZY2Uu/L7WqHok6pxNAyhOH3U9tBwRydN0xbhAjygU9lUXbkcDEXwYqf4z5aK8 SoDgpLa7w76DHsXRPiDWODLivjJMRRLfiRZB6C7pppWsMNtZs7U+KcinDqzGPGGRRBeI KISg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=gHfwB+CZ; 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 d24-v6si1276450plr.243.2018.02.07.08.26.26; Wed, 07 Feb 2018 08:26:41 -0800 (PST) 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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=gHfwB+CZ; 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 S1754568AbeBGQZZ (ORCPT + 99 others); Wed, 7 Feb 2018 11:25:25 -0500 Received: from merlin.infradead.org ([205.233.59.134]:40016 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754381AbeBGQZY (ORCPT ); Wed, 7 Feb 2018 11:25:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7BISG5o92woQdDp7D5U27vtit9tKXR5pOez/xmaMFdo=; b=gHfwB+CZboDWOSgWhSFHapA/t jzx5yatDX3T+QwXZ/4Zb7uFsfHOvdVGir140vMfrhcxsW34OviERoQfa+LeP7V+5UM66LSoVZ01I7 9od0EcLwNOgMqv0ZTFNuk+V/KR3swgOC4+F5woXtSoY1/eSs5IIVEgYsoAfMJwuUsclKwEg4CidVB oALrYetJ27s7b5o5EmlbqJramB/uVWQGv/p2UXkCJpIrU5uHbeq6xqhcPxaai37P1JK5p6HrSul0F AU0Tt4UD58/cH6z7sewRMhRH2/OZ3Mt1Tp3e1iGMPc1K87n+VZMNDhBDUSY8QwIfoEsIj94feaNva TzpXwz6aw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1ejSWz-0002ld-Rs; Wed, 07 Feb 2018 16:25:10 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 13DC02029F9F9; Wed, 7 Feb 2018 17:25:07 +0100 (CET) Date: Wed, 7 Feb 2018 17:25:07 +0100 From: Peter Zijlstra To: "Kirill A. Shutemov" Cc: Linus Torvalds , x86@kernel.org, Tom Lendacky , Dave Hansen , Andy Lutomirski , Borislav Petkov , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC 0/3] x86: Patchable constants Message-ID: <20180207162507.GB25219@hirez.programming.kicks-ass.net> References: <20180207145913.2703-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180207145913.2703-1-kirill.shutemov@linux.intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 07, 2018 at 05:59:10PM +0300, Kirill A. Shutemov wrote: > This conversion makes GCC generate worse code. Conversion __PHYSICAL_MASK > to a patchable constant adds about 5k in .text on defconfig and makes it > slightly slower at runtime (~0.2% on my box). Do you have explicit examples for the worse code? That might give clue on how to improve things.