Received: by 10.223.185.116 with SMTP id b49csp2754445wrg; Mon, 5 Mar 2018 08:11:19 -0800 (PST) X-Google-Smtp-Source: AG47ELux+BdSjjjHAjnMjWjBJqqFwUc8D6/BUXr00PZveupK452W+yXMlTPzkjJR+gNkWmaA+cPq X-Received: by 2002:a17:902:c81:: with SMTP id 1-v6mr13663889plt.205.1520266279837; Mon, 05 Mar 2018 08:11:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520266279; cv=none; d=google.com; s=arc-20160816; b=R8bUbthUgKwTiwmVyjWS2G663Q7JQWx0Zj/P+fpLmPwEAzqVGUNmgZ5gVvHwCnIAbp e1Hky2Igg7PfkrjCmB6/L3GywgxiNpjigw4sVC6BHTLuDkIRS3D90y5X4cqK65m9PCVm 8oeSnKmtkZrlvfrFn8qsnzhDw4J0w6i0n/rwB+eYShdAFTux96Qr1k32aNnsZFZZctuv Eo0iqAAq7s4xCGNzmVnAlIf3f0y4y1NzpIbGJc+3pqmRYr7B/WbnvhXsaoxvc84dGFM9 Gy/KAF6QgExbGVwo+X5jPJMZC7wgUo/Z10tPMFynzcrwGtU61AZKsn8eG7Pi2LZC/kDp mBsw== 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:arc-authentication-results; bh=AuQmjhLaNleeevZy8wKTkhHX20fJQCyxh2iu1cS3j0Y=; b=VsDoGSbsDKq6jQAd9Qsf7rTtASIpn1yi7zy1aDS0+GG9st6gm/sus3d7gfbTcbJFhl nYD6qW0ntRMU4CUWZ4RVTD13r3ngsfBYwVciFuzz/FGmL02nTKy+yjsUH7pVw/jla/SO QPMWfbdNvSX10aEqnkYdG6qGrd7oFSmnH6fekn6rubDnEBUxuzhZPBI0YeT4N4DSEDmT V5cIm9tZGJNgqAcdxDaF9WLjEEjjaDwOy1R7TfPEfr+nj6tUYzfH++5TkzCQIiiwUSmZ PqfB9Wakjh66mSDK1Yqhzh8u/ZcxsSTi55+VC4+zeWUQbqleSmvo8mytmUM9dCNY0FIw FfqQ== 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 a5-v6si9447364pll.348.2018.03.05.08.11.05; Mon, 05 Mar 2018 08:11:19 -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; 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 S1752081AbeCEQJv (ORCPT + 99 others); Mon, 5 Mar 2018 11:09:51 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:41488 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751723AbeCEQJu (ORCPT ); Mon, 5 Mar 2018 11:09:50 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 643F281B0AC2; Mon, 5 Mar 2018 16:09:49 +0000 (UTC) Received: from [10.43.17.120] (unknown [10.43.17.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C5082144B21; Mon, 5 Mar 2018 16:09:44 +0000 (UTC) Subject: Re: [PATCH 34/34] x86/mm/pti: Add Warning when booting on a PCIE capable CPU To: Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli , Waiman Long , Pavel Machek , jroedel@suse.de References: <1520245563-8444-1-git-send-email-joro@8bytes.org> <1520245563-8444-35-git-send-email-joro@8bytes.org> From: Denys Vlasenko Message-ID: Date: Mon, 5 Mar 2018 17:09:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1520245563-8444-35-git-send-email-joro@8bytes.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 05 Mar 2018 16:09:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 05 Mar 2018 16:09:49 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dvlasenk@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/05/2018 11:26 AM, Joerg Roedel wrote: > From: Joerg Roedel > > Warn the user in case the performance can be significantly > improved by switching to a 64-bit kernel. > > Suggested-by: Andy Lutomirski > Signed-off-by: Joerg Roedel > --- > arch/x86/mm/pti.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c > index 3ffd923..8f5aa0d 100644 > --- a/arch/x86/mm/pti.c > +++ b/arch/x86/mm/pti.c > @@ -385,6 +385,22 @@ void __init pti_init(void) > > pr_info("enabled\n"); > > +#ifdef CONFIG_X86_32 > + if (boot_cpu_has(X86_FEATURE_PCID)) { > + /* Use printk to work around pr_fmt() */ > + printk(KERN_WARNING "\n"); > + printk(KERN_WARNING "************************************************************\n"); > + printk(KERN_WARNING "** WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! **\n"); > + printk(KERN_WARNING "** **\n"); > + printk(KERN_WARNING "** You are using 32-bit PTI on a 64-bit PCID-capable CPU. **\n"); > + printk(KERN_WARNING "** Your performance will increase dramatically if you **\n"); > + printk(KERN_WARNING "** switch to a 64-bit kernel! **\n"); > + printk(KERN_WARNING "** **\n"); > + printk(KERN_WARNING "** WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! **\n"); > + printk(KERN_WARNING "************************************************************\n"); Isn't it a bit too dramatic? Not one, but two lines of big fat warnings? There are people who run 32-bit kernels on purpose, not because they did not yet realize 64 bits are upon us. E.g. industrial setups with strict regulations and licensing requirements. In many such cases they already are more than satisfied with CPU speeds, thus not interested in 64-bit migration for performance reasons, and avoid it because it would incur mountains of paperwork with no tangible gains. The big fat warning on every boot would be irritating.