Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1436577pxb; Tue, 17 Aug 2021 11:38:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9iZWH3WY8cpyJvfW33XBkqWOLj/Z84beuuzfypLBtVETbvKeYigPqP1vf/vzLr5/dBY+D X-Received: by 2002:a05:6402:4387:: with SMTP id o7mr5580405edc.204.1629225528243; Tue, 17 Aug 2021 11:38:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629225528; cv=none; d=google.com; s=arc-20160816; b=YMRDh0nHP96FsuCAcqdcjdCuxpl2H3XhQo2Y+6k6yLscZrbkuZw9mPgYuiDrTtlwfQ vsIUL6FNp/mTFGCa93ETnlpfSMmJkobsjx4f+4Hu9e+Che8AQ1yN7qUQJ9nUn5TN4R9c 1NrIW09wJ4M2F3ry17xPbBsbjh+wdRTKn+zdA/EednyzTnrm7mwmhTo378ecwzoq5Box wiBR4RFSQKDZrKODfMwtcyLCFyRwm/RMT8X8+hRR3/t7dB4qIRObjRHYCfTG20PLWga8 Pa9NZ1nZtYtsTGbyXJprcqFLK91FfX5ngXKpjxME8EBAyGGwWuGBQcMDc7BoLY98tLSF nQvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SO/ZV2Mk9I+24npFwndDFprvZYKCgwEBp0TLU34JObY=; b=YOt5gqauG2Y7YeBBvS2SlJUikPG+/72JhIsmYlRPQgmlr9gI1pxCzlEZqk79OXY1dI DH3rOPaYi3lbkOIwJVgmWNbNIKPpFYr6heobglCdGibWJiRELrXGE+tEjXOhCKro9Wae sKILrgxzjq6tssjsVAqzSeoLjqbrH2WPi+nCGApRgThKYLhuj0TZjxsagHPOJQtT+Zh8 F2sywdQ0Hmu+Ghij0hIc9B2ktB4AXARhxqvuCgRHE+5Y8vFZptSXbqrgmpBRPZJAAAY5 Ev1AXSiiVVIQhFm0Oewdl+eSM7KdjJENfe86/7sx8SnyOGMDagPA+Z0uRXaTcgBC6zrH ZynA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=mD4tyYQ4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kk3si3082649ejc.625.2021.08.17.11.38.24; Tue, 17 Aug 2021 11:38:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=mD4tyYQ4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232894AbhHQSgf (ORCPT + 99 others); Tue, 17 Aug 2021 14:36:35 -0400 Received: from mail.skyhub.de ([5.9.137.197]:49988 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232948AbhHQSge (ORCPT ); Tue, 17 Aug 2021 14:36:34 -0400 Received: from zn.tnic (p200300ec2f1175006a73053df3c19379.dip0.t-ipconnect.de [IPv6:2003:ec:2f11:7500:6a73:53d:f3c1:9379]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 5F3F41EC0556; Tue, 17 Aug 2021 20:35:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1629225356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=SO/ZV2Mk9I+24npFwndDFprvZYKCgwEBp0TLU34JObY=; b=mD4tyYQ4Dgu/6qqSsGd1ETxygVxMjefruTmdlXPAzT1Cldts7ME5phL+vafDh5e34LMIQf 1Va0l2sDKUFdx6x77/5TWPNlUAvYvmsSk9uo+4+U5cd7hsm5q2VLPPryNQjTFTDEbf1XHF QjYKEGZsY0xZieL8R8EBfO3HVDFr9Kc= Date: Tue, 17 Aug 2021 20:36:35 +0200 From: Borislav Petkov To: torvic9@mailbox.org Cc: "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "clang-built-linux@googlegroups.com" , "graysky@archlinux.us" Subject: Re: [PATCH 2/2] x86, Makefile: Add new generic x86-64 settings v2/v3/v4 Message-ID: References: <269701460.117528.1629210189833@office.mailbox.org> <796036867.117557.1629210288168@office.mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <796036867.117557.1629210288168@office.mailbox.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 17, 2021 at 04:24:48PM +0200, torvic9@mailbox.org wrote: > Add new generic x86-64 CPU tunings introduced with recent versions of > gcc and clang, as documented in x86-64-psABI [1]. > > This is taken straight from graysky's CPU optimization patch with minor > modifications [2]. > > [1] https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/77566eb03bc6a326811cb7e9a6b9396884b67c7c > [2] https://github.com/graysky2/kernel_compiler_patch > > Signed-off-by: Tor Vic > --- > arch/x86/Kconfig.cpu | 26 +++++++++++++++++++++++++- > arch/x86/Makefile.cpu | 6 ++++++ > 2 files changed, 31 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu > index 814fe0d349b0..a2c872aa5a0b 100644 > --- a/arch/x86/Kconfig.cpu > +++ b/arch/x86/Kconfig.cpu > @@ -294,6 +294,30 @@ config GENERIC_CPU > Generic x86-64 CPU. > Run equally well on all x86-64 CPUs. > > +config GENERIC_CPU_V2 > + bool "Generic-x86-64-v2" > + depends on ( CC_IS_GCC && GCC_VERSION > 110000 ) || ( CC_IS_CLANG && CLANG_VERSION >= 120000 ) > + depends on X86_64 > + help > + Generic x86-64 CPU. > + Run equally well on all x86-64 CPUs with min support of x86-64-v2. > + > +config GENERIC_CPU_V3 > + bool "Generic-x86-64-v3" > + depends on ( CC_IS_GCC && GCC_VERSION > 110000 ) || ( CC_IS_CLANG && CLANG_VERSION >= 120000 ) > + depends on X86_64 > + help > + Generic x86-64-v3 CPU with v3 instructions. > + Run equally well on all x86-64 CPUs with min support of x86-64-v3. > + > +config GENERIC_CPU_V4 > + bool "Generic-x86-64-v4" > + depends on ( CC_IS_GCC && GCC_VERSION > 110000 ) || ( CC_IS_CLANG && CLANG_VERSION >= 120000 ) > + depends on X86_64 > + help > + Generic x86-64 CPU with v4 instructions. > + Run equally well on all x86-64 CPUs with min support of x86-64-v4. Every once in a while, patches like that pop up without any real numbers advocating for the additional and perhaps unnecessary complexity. If those -march switches don't bring any measureable improvements - and I highly doubt they do - you shouldn't waste time with submitting them. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette