🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.nt.kernel-mode
Article #1

Re: rdtsc bclk overclock

#1
From: daniel S
Date: Fri, 06 Oct 2023 21:00
35 lines
2502 bytes
On Friday, October 6, 2023 at 8:55:44 PM UTC, daniel S wrote:
> when i overclock my bclk to 129mhz rdtsc not cycle correctly when reading the freq what cause it ?? 
> 
> turbo mode disabled c states disabled hyperthreading disabled speedshift disabled make sure its reading in first core KeSetAffinityThread(); 
> i have i9 9900ks 
> 
> base clock reading 4ghz 
> bclk clock reading 5.160ghz when overclock 129mhz 
> 
> uint64_t tsc_hz = __readmsr(0xCE); 
> return ((tsc_hz >> 8) & 0xff) * 100 * 1E6; freq rdtsc reading consistent on 4ghz 
> 
> uint64_t tsc_hz = __readmsr(0xCE); 
> return ((tsc_hz >> 8) & 0xff) * 129 * 1E6; freq rdtsc reading overflow on 129mhz 
> 
> is there way to fix it ? i even try reading the freq directly with cpuid 
> 
> inline unsigned __int64 get_tsc_freqX() { 
> static unsigned __int64 freq = 0; 
> if (freq == 0) { 
> int raw[4]; 
> __cpuid(raw, 0x16); // get cpu freq 
> freq = static_cast<unsigned __int64>(raw[0]) * 1000000; 
> } 
> return freq; 
> } 
> 
> but seems rdtsc still not cycle count correctly on bclk overclock 129mhz

turbo mode also disabled
Technical Details
Message-ID: <0e8bbaec-3958-4115-ada3-a75538f80222n@googlegroups.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <ad64683a-c2f6-4a94-ae63-b2115ccb9466n@googlegroups.com>

Show Full Headers
Complete Article Headers
Message-ID: <0e8bbaec-3958-4115-ada3-a75538f80222n@googlegroups.com>
Subject: Re: rdtsc bclk overclock
Date: Fri, 06 Oct 2023 21:00:46 +0000
From: daniel S <wfqwqfwqf@gmail.com>
References: <ad64683a-c2f6-4a94-ae63-b2115ccb9466n@googlegroups.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
X-Received: by 2002:a05:622a:1108:b0:418:1ae1:bc42 with SMTP id e8-20020a05622a110800b004181ae1bc42mr128368qty.11.1696626046966; Fri, 06 Oct 2023 14:00:46 -0700 (PDT)
X-Received: by 2002:a05:6870:5aac:b0:1dd:1837:c70b with SMTP id dt44-20020a0568705aac00b001dd1837c70bmr3750518oab.4.1696626046768; Fri, 06 Oct 2023 14:00:46 -0700 (PDT)
Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode
In-Reply-To: <ad64683a-c2f6-4a94-ae63-b2115ccb9466n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=207.232.29.254; posting-account=5m1p6AoAAACZjjAoMZhzGWRf3jzwFDq7
Nntp-Posting-Host: 207.232.29.254
User-Agent: G2/1.0
Mime-Version: 1.0
Injection-Date: Fri, 06 Oct 2023 21:00:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable