NetBSD Problem Report #60596
From www@netbsd.org Sat Aug 15 08:44:28 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.netbsd.org", Issuer "YR2" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 4FA931A923C
for <gnats-bugs@gnats.NetBSD.org>; Sat, 15 Aug 2026 08:44:28 +0000 (UTC)
Message-Id: <20260815084427.2E9B01A923E@mollari.NetBSD.org>
Date: Sat, 15 Aug 2026 08:44:27 +0000 (UTC)
From: rvp@SDF.ORG
Reply-To: rvp@SDF.ORG
To: gnats-bugs@NetBSD.org
Subject: No need to read CPUID if model/family indicated CPU has invariant TSC
X-Send-Pr-Version: www-1.0
X-From4GNATS: "rvp@SDF.ORG via gnats" <gnats-admin@NetBSD.org>
>Number: 60596
>Category: kern
>Synopsis: No need to read CPUID if model/family indicated CPU has invariant TSC
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Aug 15 08:45:00 +0000 2026
>Originator: RVP
>Release: 11.99.7
>Organization:
>Environment:
NetBSD CoreBook.local 11.99.7 NetBSD 11.99.7 (COREBOOK_DIAG) #0: Sat Aug 15 04:21:15 UTC 2026 bld@CoreBook.local:/tmp/obj/usr/src/sys/arch/amd64/compile/COREBOOK_DIAG amd64
>Description:
If the CPU model and family indicate a invariant TSC, don't bother
checking the CPUID again. This is a teeny optimization.
>How-To-Repeat:
>Fix:
```
--- sys/arch/x86/x86/tsc.c.orig 2026-03-01 13:57:41.000000000 +0000
+++ sys/arch/x86/x86/tsc.c 2026-03-19 04:50:09.497920788 +0000
@@ -153,6 +153,9 @@
}
}
+ if (invariant)
+ return true;
+
/*
* The best way to check whether the TSC counter is invariant or not
* is to check CPUID 80000007.
```
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.