From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A96331E849 for ; Wed, 25 Mar 2026 23:18:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774480714; cv=none; b=SJDrNjmvR0mnAo7UgvYfAMhll30vWPO806BYkdVbTkCd/6EgX8ZEBLF4Z3PVOGBIPfW5pYsLb93w5801KKRzl8/ZMySrTKC+qudjH89FvAWs+db4CdPGVMchKKkL5yU//kuftSpxI3IBL175uKsitaOHZUpbhHrJr5lpgOby0aw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774480714; c=relaxed/simple; bh=yiXvot8bSIlYWy5wM+pGs9CMRYxK0vgdqoCIxp9kfgs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DU3XRsXYOZmbm8Zm0ZmNqMKBtJHr34nsG/Ja/p+2G73X1rTpWEzNU6XNlaDHsZF/yqvWUzW9yzUYUvPsphhP4b4Q9rXRfZ5IQeSVbgPPn5qTxVl1k+jKhHElo+SdGPzdGbquQsOrUociz3CR6t4ksCKRWMb83qiPTtBY8ip2EQY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=fUvf/TPE; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="fUvf/TPE" Received: from mail.zytor.com (c-76-133-66-138.hsd1.ca.comcast.net [76.133.66.138]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 62PN21bq3806967 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 25 Mar 2026 16:02:03 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 62PN21bq3806967 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2026022301; t=1774479723; bh=aKUrKzoXdnSjIjTa0rU44RBw5UaSp01rC7RUaxYSb5s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fUvf/TPEFaeUhceHGl2POdIFZnbsCHUN0chypYqCNtpTSQGkU3mKZIMOwPaINfFAa UhJn/Xi2/1FGh11wulOHg32xsT4Yr3aUrOJJP7VUIJVDcfrJlouuNcV1+yFmZjV/Mm 42DW433ufxQeoyp2mGBN1XcZqNnQLZudoNcH2mx/hGHg0UCZfqekto0xY4WeAoGwC4 zD47upgxsNXFjIKkgCY17LjvUpZ3fjDb20kop+mQfGUclcYSIUD7KisYLiLb4rvnVh xXoDeJ1hL+yPU9dWoNIfGSkqMrdJJbtmBr21VousmM4QqBhvJtTEIEcoRGKRGbqAB5 o817PYv1bd9Cg== From: "H. Peter Anvin" To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: "Peter Zijlstra (Intel)" , Kees Cook , Xin Li , "Ahmed S. Darwish" , Sohil Mehta , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] x86/fred: enable FRED by default Date: Wed, 25 Mar 2026 16:01:47 -0700 Message-ID: <20260325230151.1898287-2-hpa@zytor.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260325230151.1898287-1-hpa@zytor.com> References: <20260325230151.1898287-1-hpa@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When FRED was added to the mainline kernel, it was set up as an explicit opt-in due to the risk of regressions before hardware was available publicly. Now, Panther Lake (Core Ultra 300 series) has been released, and benchmarking by Phoronix has shown that it provides a significant performance benefit on most workloads: https://www.phoronix.com/review/intel-fred-panther-lake Accordingly, enable FRED by default if the CPU supports it. FRED can of course still be disabled via the fred=off command line option. Signed-off-by: H. Peter Anvin (Intel) --- Documentation/admin-guide/kernel-parameters.txt | 4 ++-- arch/x86/kernel/cpu/common.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 03a550630644..bfa8a20ccc37 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -1750,8 +1750,8 @@ Kernel parameters fred= [X86-64] Enable/disable Flexible Return and Event Delivery. Format: { on | off } - on: enable FRED when it's present. - off: disable FRED, the default setting. + on: enable FRED when it's present, the default setting. + off: disable FRED. ftrace=[tracer] [FTRACE] will set and start the specified tracer diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index a8ff4376c286..0b02cb038d7f 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1746,7 +1746,7 @@ static void __init cpu_parse_early_param(void) /* Minimize the gap between FRED is available and available but disabled. */ arglen = cmdline_find_option(boot_command_line, "fred", arg, sizeof(arg)); - if (arglen != 2 || strncmp(arg, "on", 2)) + if (arglen == 3 && !strncmp(arg, "off", 3)) setup_clear_cpu_cap(X86_FEATURE_FRED); arglen = cmdline_find_option(boot_command_line, "clearcpuid", arg, sizeof(arg)); -- 2.53.0