From nobody Sat Jun 27 14:18:38 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gnZQw4PJHz6jdc8; Sat, 27 Jun 2026 14:18:48 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2001:41d0:700:4a43:a25:de0:0:13]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4gnZQv1sgdz3Xbt; Sat, 27 Jun 2026 14:18:47 +0000 (UTC) (envelope-from freebsd@omnilan.de) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@omnilan.de designates 2001:41d0:700:4a43:a25:de0:0:13 as permitted sender) smtp.mailfrom=freebsd@omnilan.de Received: from mh0.gentlemail.de (mh0.gentlemail.de [135.125.173.218]) by mx0.gentlemail.de (8.18.1/8.18.1) with ESMTP id 65REIdZ5085622; Sat, 27 Jun 2026 14:18:39 GMT (envelope-from freebsd@omnilan.de) Received: from [172.21.35.3] (s1.omnilan.de [217.91.127.234]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id CAA94AA93; Sat, 27 Jun 2026 14:18:38 +0000 (UTC) Message-ID: <21a39777-c38e-4805-abdc-b1c19183bce1@omnilan.de> Date: Sat, 27 Jun 2026 16:18:38 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: hwpstate_intel i386 build workaround [Was: Re: git: 7b26353a59d6 - main - hwpstate_intel: Disable package control on hybrid CPU] To: ShengYi Hung , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <6a1e7b3b.1a45a.91f6820@gitrepo.freebsd.org> Content-Language: en-US, de-DE From: Harry Schmalzbauer Organization: OmniLAN In-Reply-To: <6a1e7b3b.1a45a.91f6820@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.25 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.95)[-0.949]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR]; MIME_TRACE(0.00)[0:+]; HAS_ORG_HEADER(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@FreeBSD.org,dev-commits-src-all@FreeBSD.org]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[omnilan.de]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Spamd-Bar: --- X-Rspamd-Queue-Id: 4gnZQv1sgdz3Xbt On 2026-06-02 08:42, ShengYi Hung wrote: > The branch main has been updated by aokblast: > > URL: https://cgit.FreeBSD.org/src/commit/?id=7b26353a59d66dc1bc611fd042a49b9e3bd13699 > > commit 7b26353a59d66dc1bc611fd042a49b9e3bd13699 > Author: ShengYi Hung > AuthorDate: 2026-06-01 09:46:37 +0000 > Commit: ShengYi Hung > CommitDate: 2026-06-02 06:41:41 +0000 > > hwpstate_intel: Disable package control on hybrid CPU > > In package control mode, the performance of all cores depends on the > most recent value written to the request field. If the last write comes > from an E-core, all cores are forced to align with the E-core > performance level, resulting in significant performance degradation. > Therefore, package control is disabled on hybrid-core systems. > > Reviewed by: olce > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > Sponsored by: Framework Computer Inc > Differential Revision: https://reviews.freebsd.org/D57377 > --- > sys/x86/cpufreq/hwpstate_intel.c | 21 +++++++++++++++++++++ In lieu of a proper fix, due to lacking skills, I'm working around i386 incompatibility with this diff: diff --git a/sys/x86/cpufreq/hwpstate_intel.c b/sys/x86/cpufreq/hwpstate_intel.c index db8600d7b89a..b9b68f1b14d0 100644 --- a/sys/x86/cpufreq/hwpstate_intel.c +++ b/sys/x86/cpufreq/hwpstate_intel.c @@ -321,6 +321,7 @@ sysctl_epp_select(SYSCTL_HANDLER_ARGS)         return (ret);  } +#ifndef __i386__  static void  intel_hwpstate_hybrid_cb(void *ctx)  { @@ -328,11 +329,14 @@ intel_hwpstate_hybrid_cb(void *ctx)         atomic_add_32(small_cores, PCPU_GET(small_core));  } +#endif  void  intel_hwpstate_identify(driver_t *driver, device_t parent)  { +#ifndef __i386__         uint32_t small_cores = 0; +#endif         if (device_find_child(parent, "hwpstate_intel", DEVICE_UNIT_ANY) != NULL)                 return; @@ -353,6 +357,7 @@ intel_hwpstate_identify(driver_t *driver, device_t parent)         if ((cpu_power_eax & CPUTPM1_HWP) == 0)                 return; +#ifndef __i386__         /*          * On hybrid-core systems, package-level control cannot be used.          * It may cause all cores to run at the E-core frequency because @@ -363,6 +368,7 @@ intel_hwpstate_identify(driver_t *driver, device_t parent)             intel_hwpstate_hybrid_cb, smp_no_rendezvous_barrier, &small_cores);         if (small_cores > 0 && small_cores < mp_ncores)                 hwpstate_pkg_ctrl_enable = false; +#endif         if (BUS_ADD_CHILD(parent, 10, "hwpstate_intel", device_get_unit(parent))             == NULL) I know i386 is not supported anymore. Just in case anybody else wants to keep i368-stable/15 for bhyve guests for example, where cpufreq(4) isn't attaching anyways. Thanks, -harry