From nobody Sat Jun 27 15:23:59 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 4gnbtP6DP2z6jk5K for ; Sat, 27 Jun 2026 15:24:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gnbtP0W2Cz3hKT for ; Sat, 27 Jun 2026 15:24:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-51a14efe25fso22645681cf.1 for ; Sat, 27 Jun 2026 08:24:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782573852; cv=none; d=google.com; s=arc-20260327; b=hnjJpTkOtfBUMpXmwdMU+4a49HEF3SJKOPediAy9LVu+RvIyOr5Pu5qufAbP3+sT9e UNlQgBulfkZw+FI6Mxu4zaEQ7u9Nt86dMMFVPyFVidc/eVGWPjobHbEjrg4UzspZIszv 2j4RwxiHo35MljzgHL4Rn0hV5ZetR0jibhF9hLD1O1taQj8kLF5cXV0EqLKCWCcROVpZ 5Cgs0hdiB9RA6RvR0r0tW0GUP4BjVVsGwu1alJ1v4a5m7Qz6ovSgsBFW8Ta1Lo90rlNP v/BGnRm50VSLy73+9ifL0JhHEHNOugBLl8/6OgqjJzly7SwJDp4QA49s0qaRKwNokgBN QJyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version; bh=Ljmoe215kv2H8IWomey8c5VcQmBYAwot5baUsmLgsjk=; fh=a16mNBDeTYlIpd/YVnuxiFo/pKtfjsx1F62PPqUUJk0=; b=Zvye86qW6fIw65ZnKR8BG7KiWZvc4c19KOodEB4hZQp2w6OP8tHtKflSWWaCQhHkQi HMbY1shpeBy/ZXtGLqqu2ANuy1Ojw4Ytl9l1mWu//4vHF29tXyOJg0c3qlt1p9jToQ8i h+ZvPqzn3SV5ikFvdKw0YLZ2sQTb5mmOsSuLsvKKXQBVrZD1Hm6RaEntm+TnWCVeXNFK 9UMxo/Y5MP4tBl3YiIq8vTBwBmBazSIQHsm+XuFHdWh3wg2mEwp42Bn42iKolPGPHShY pp/I/k7FYLo4nNxOFFWfFB2T8FXpQ3I/dZaebo7s2h4YD6OSnrQxZ0iZgc21kqLfbcm4 u3BQ==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782573852; x=1783178652; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Ljmoe215kv2H8IWomey8c5VcQmBYAwot5baUsmLgsjk=; b=JI7dro26xOBWUpJWL8p4FNJVq9CGvH0a2MCI/Lh7ZupTPqMlNIHnYucNUOwLGLFiwk wU5QqPlwjh2c8rVum+quRKOqsyNhoJtezf1vrRwKUmOOpcwzNBpLUz9dY8MryvqBcnxh QIxSnZ1qMRE9bImwR1Q/00BsaJD0ZysWaKfycSezazTNTpqRtjT3IziMgIYSvgjk2Ylc XC9bjI6v/S/n0ABfP+8iMuQwipoF5F0DCIh3Bbb4+vwq2B6P7b0xN8TQQXqQiY0patpy L+/jdEUWJkJyZOdjnSz+206RRBxFfDZJgMq+K1BB0wpn5FUsfHxSBtCR2SiwqdATNgtx noJw== X-Forwarded-Encrypted: i=1; AFNElJ+wUOwTsMZ+THZxRgiVt3dQCUJoXKGZe9ZYcfUXOpk4sW77kuMWI/4mZZMdifM2lSjfp7tBGT1GedPRfEF6ou2y1zKr@freebsd.org X-Gm-Message-State: AOJu0Yz3bHfrwPLk3/lC6lBLpwwvI8UJLRBEt2jTsXmv4A2czuDy6IBw 4zsPWXdlq2WwP17OJPXTBHljRdFc8XQRV2Rnek5+GgTEfQvaBqPpzCoTaFXs79DafV/nDchyjbt oHEPA9BCX8i2NBJKdZKK3qn8/ebYxNho= X-Gm-Gg: AfdE7cmlvnXWJQH7/rzJZx7lto6mcED+YXYivGiXUfN6zMCbB8PAmweai3u/qRcXjk9 f3wneXRLTr8jiMxB80g0BEJKyZ0HRcO2cG1b1q3CsY9ocp9qbgcQLle/6PpDn4Bgr1WNbRtNlvh FywoaOgR04D7YB57qSf/z3xm6f9djoc5MLi1acUzaJ8c+mSLHi9nioiD/6RF0UgmE8d1b2oTUpy yZ698cpA48jMlsbKoGqo7a94ZggeBNPSAfaeIu7aOAlmtl65k9W5Ta5HWsrNC1sDpR4/xEU97Gp MwdMG8FboOzhRxBrrKWH5mkJJFfBtaGAuDhMkNsi8LZ/LZmtKUMbEIvQ53Nt12WR6xe506XS3lX IPe2IjCr3A3n88uwhQIZ3Q0uTht2vY+eUsocp04dZ7HdAMiY= X-Received: by 2002:a05:622a:2617:b0:517:7d69:805b with SMTP id d75a77b69052e-51a7283d38fmr170218951cf.27.1782573852005; Sat, 27 Jun 2026 08:24:12 -0700 (PDT) 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 References: <6a1e7b3b.1a45a.91f6820@gitrepo.freebsd.org> <21a39777-c38e-4805-abdc-b1c19183bce1@omnilan.de> In-Reply-To: <21a39777-c38e-4805-abdc-b1c19183bce1@omnilan.de> From: Adrian Chadd Date: Sat, 27 Jun 2026 08:23:59 -0700 X-Gm-Features: AVVi8CfRHmxkhWVj_q4eV-76mn15XTQVWNwgshU0dMsoLxJB6Y6m23xxD2GNBmA Message-ID: Subject: Re: hwpstate_intel i386 build workaround [Was: Re: git: 7b26353a59d6 - main - hwpstate_intel: Disable package control on hybrid CPU] To: Harry Schmalzbauer Cc: ShengYi Hung , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4gnbtP0W2Cz3hKT X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated please create a review for this? It sounds like they should've wrapped it if #ifdef amd64 or something -a On Sat, 27 Jun 2026 at 07:19, Harry Schmalzbauer wrote: > > 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 > >