Personal computing discussed

Moderators: renee, Flying Fox, morphine

 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Anand's RyZen+ Review just got revised

Thu Apr 26, 2018 9:26 am

DragonDaddyBear wrote:
Chuck and JBI, thank you for the explanation. If you don't mind me asking, what kinds of applications would such a counter be needed for? Could you not run into race conditions if incorrectly used this? Sorry for the probably silly question, not a programmer.

High resolution timers are often used to accurately measure elapsed time between two events, for benchmarking and to help with code optimization. You also need high resolution timers for anything that needs to generate precisely timed events, like DAW applications (software based MIDI sequencing).
Nostalgia isn't what it used to be.
 
chuckula
Minister of Gerbil Affairs
Topic Author
Posts: 2109
Joined: Wed Jan 23, 2008 9:18 pm
Location: Probably where I don't belong.

Re: Anand's RyZen+ Review just got revised

Thu Apr 26, 2018 9:36 am

just brew it! wrote:
DragonDaddyBear wrote:
Chuck and JBI, thank you for the explanation. If you don't mind me asking, what kinds of applications would such a counter be needed for? Could you not run into race conditions if incorrectly used this? Sorry for the probably silly question, not a programmer.

High resolution timers are often used to accurately measure elapsed time between two events, for benchmarking and to help with code optimization. You also need high resolution timers for anything that needs to generate precisely timed events, like DAW applications (software based MIDI sequencing).


I would add that hardware timers are also used in "real time*" applications that require precise timing that can be independent of the foibles of a CPU running non-deterministic software, although HPET has issues that prevent it from being the best implementation of a hardware timer for these applications for at least two reasons: 1. It's susceptible to interrupt masking that means a timer event might be missed, and 2. HPET counts up forever (until looping back around to 0) and it's possible to "miss" the target time while counting up, which forces the HPET timer to loop back around through an entire cycle before potentially hitting the target time again. Wikipedia has more.


* A word that is abused horribly to mean "it's fast!" when that's not what it means.
4770K @ 4.7 GHz; 32GB DDR3-2133; Officially RX-560... that's right AMD you shills!; 512GB 840 Pro (2x); Fractal Define XL-R2; NZXT Kraken-X60
--Many thanks to the TR Forum for advice in getting it built.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Anand's RyZen+ Review just got revised

Thu Apr 26, 2018 10:08 am

chuckula wrote:
I would add that hardware timers are also used in "real time*" applications that require precise timing that can be independent of the foibles of a CPU running non-deterministic software, although HPET has issues that prevent it from being the best implementation of a hardware timer for these applications for at least two reasons: 1. It's susceptible to interrupt masking that means a timer event might be missed, and 2. HPET counts up forever (until looping back around to 0) and it's possible to "miss" the target time while counting up, which forces the HPET timer to loop back around through an entire cycle before potentially hitting the target time again. Wikipedia has more.

* A word that is abused horribly to mean "it's fast!" when that's not what it means.

Indeed. From a software engineering standpoint, it really means "deterministic timing and latency", not "fast". What most people probably think of as "real time" is what I'd call "quasi-real time" -- timing slop and latency are generally within a certain tolerance, but are not deterministic and there may be extreme outliers.

And yes, when running in an environment that isn't designed for true real time operation, throwing faster hardware at the problem will often help...
Nostalgia isn't what it used to be.
 
DragonDaddyBear
Gerbil Elite
Posts: 985
Joined: Fri Jan 30, 2009 8:01 am

Re: Anand's RyZen+ Review just got revised

Thu Apr 26, 2018 10:18 am

So, would accurate emulation of a chip or piece of hardware be an time in which one would need to use such a timer?
 
Waco
Maximum Gerbil
Posts: 4850
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: Anand's RyZen+ Review just got revised

Thu Apr 26, 2018 10:26 am

DragonDaddyBear wrote:
So, would accurate emulation of a chip or piece of hardware be an time in which one would need to use such a timer?

Depends on how accurate you need the timing to be.
Victory requires no explanation. Defeat allows none.
 
Captain Ned
Global Moderator
Posts: 28704
Joined: Wed Jan 16, 2002 7:00 pm
Location: Vermont, USA

Re: Anand's RyZen+ Review just got revised

Thu Apr 26, 2018 11:34 am

Waco wrote:
Depends on how accurate you need the timing to be.

Something tells me you probably take the lead in precision timing requirements 'round here.
What we have today is way too much pluribus and not enough unum.
 
Waco
Maximum Gerbil
Posts: 4850
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: Anand's RyZen+ Review just got revised

Thu Apr 26, 2018 1:49 pm

Captain Ned wrote:
Something tells me you probably take the lead in precision timing requirements 'round here.

Not me personally, but there are many very interested in precision timing of particular things within throwing range. :P

Realistically, the standard clock sources on anything modern are far more precise (and usually more than accurate enough) than almost any non-specialty application needs.
Victory requires no explanation. Defeat allows none.
 
chuckula
Minister of Gerbil Affairs
Topic Author
Posts: 2109
Joined: Wed Jan 23, 2008 9:18 pm
Location: Probably where I don't belong.

Re: Anand's RyZen+ Review just got revised

Thu Apr 26, 2018 1:52 pm

Waco wrote:
Not me personally, but there are many very interested in precision timing of particular things within throwing range. :P



And he's totally NOT talking about simulating detonations of nukes here folks.
Just putting it out there that's NOT what we're dealing with.
4770K @ 4.7 GHz; 32GB DDR3-2133; Officially RX-560... that's right AMD you shills!; 512GB 840 Pro (2x); Fractal Define XL-R2; NZXT Kraken-X60
--Many thanks to the TR Forum for advice in getting it built.
 
Waco
Maximum Gerbil
Posts: 4850
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: Anand's RyZen+ Review just got revised

Thu Apr 26, 2018 1:59 pm

chuckula wrote:
And he's totally NOT talking about simulating detonations of nukes here folks.
Just putting it out there that's NOT what we're dealing with.

:wink:
Victory requires no explanation. Defeat allows none.
 
Vhalidictes
Gerbil Jedi
Posts: 1835
Joined: Fri Jan 07, 2005 2:32 pm
Location: Paragon City, RI

Re: Anand's RyZen+ Review just got revised

Thu Apr 26, 2018 5:08 pm

chuckula wrote:
And he's totally NOT talking about simulating detonations of nukes here folks.
Just putting it out there that's NOT what we're dealing with.


Understood. I always wondered about the whole INTEL thing, and I guess now I know why.
 
Shobai
Gerbil First Class
Posts: 165
Joined: Sat Sep 03, 2005 1:18 am

Re: Anand's RyZen+ Review just got revised

Fri Apr 27, 2018 3:56 am

just brew it! wrote:
It might be an interrupt overhead thing, possibly exacerbated by Meltdown mitigation.


Except that it can't be Meltdown, right?

Every man and his dog (with the possible exception of chuckula, I'm not sure) appears to agree with AMD that they're not susceptible to Meltdown.

So the fact that Anandtech's graphs show the AMD platform being negatively affected in the same tests as the Intel system when both are using HPET suggests that this can't be Meltdown, because the mitigations wouldn't be necessary for the AMD system and so wouldn't be in play, right?
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Anand's RyZen+ Review just got revised

Fri Apr 27, 2018 6:29 am

Shobai wrote:
Except that it can't be Meltdown, right?

Every man and his dog (with the possible exception of chuckula, I'm not sure) appears to agree with AMD that they're not susceptible to Meltdown.

So the fact that Anandtech's graphs show the AMD platform being negatively affected in the same tests as the Intel system when both are using HPET suggests that this can't be Meltdown, because the mitigations wouldn't be necessary for the AMD system and so wouldn't be in play, right?

All systems have interrupt overhead, so if HPET is generating a lot of interrupts there will be some impact regardless of whether the Meltdown patch affects it.

Or it could be that AMD's HPET implementation is just more efficient.
Nostalgia isn't what it used to be.
 
Shobai
Gerbil First Class
Posts: 165
Joined: Sat Sep 03, 2005 1:18 am

Re: Anand's RyZen+ Review just got revised

Sat Apr 28, 2018 1:03 am

just brew it! wrote:
All systems have interrupt overhead, so if HPET is generating a lot of interrupts there will be some impact regardless of whether the Meltdown patch affects it.

Or it could be that AMD's HPET implementation is just more efficient.


Well, as mentioned earlier,

Shobai wrote:
The more interesting graphs, academically, are the ones you neglected to show: the AMD version of that graph, or the graph from the following pages where the "unforced" results for both platforms are shown normalised to the AMD results.

They show that both systems were affected in the same contexts, and only the magnitude of the effect was different; firstly, it makes me wonder what exactly those programs are doing that causes such a discrepancy, but it also makes me wonder how much different the results would be if the HPET for both systems was running at the same frequency - given that the Intel platform's was running at, what, 5 / 3rds the AMD's.


So, perhaps not necessarily more efficient, if they're not running at the same clocks.
 
Kretschmer
Gerbil XP
Posts: 462
Joined: Sun Oct 19, 2008 10:36 am

Re: Anand's RyZen+ Review just got revised

Sat Apr 28, 2018 7:53 am

Apologies if I missed this, but is there any way to tell if an application is forcing use of the HPET timer? I use MSI Afterburner to regulate fan speeds on my desktop and MSI Afterburner/Intel XTU to undervolt my laptop.
 
Noinoi
Gerbil Team Leader
Posts: 280
Joined: Fri Jun 26, 2015 11:31 pm
Location: Sabah, Malaysia

Re: Anand's RyZen+ Review just got revised

Sat Apr 28, 2018 8:22 am

Kretschmer wrote:
Apologies if I missed this, but is there any way to tell if an application is forcing use of the HPET timer? I use MSI Afterburner to regulate fan speeds on my desktop and MSI Afterburner/Intel XTU to undervolt my laptop.

Anandtech linked to this piece of software that'll tell you what kind of timer Windows is preferring to use, the ability to force and unforce HPET, and run some benchmarks to determine the performance impact of forcing HPET instead of letting Windows decide.
[email protected] | Patriot 2x16GB | Asus GTX 970 | Aorus Z390 Pro Wifi | Intel 660p 512GB + Kingston Fury 240GB + 2x4TB WD HDDs | Win 10

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On