Cannot reproduce with microcode 0xc6

By: Travis Downs (travis.downs.delete@this.gmail.com), February 27, 2019 8:25 am
Room: Moderated Discussions
Adrian (a.delete@this.acm.org) on February 27, 2019 4:02 am wrote:

Thanks Adrian for all these results! I'll have time to took at them a bit more later, but a couple notes in the meantime:

> Here you have the results for a new Coffee Lake with microcode
> 0x9a, which I assume is still older than yours.

It's hard to assume much about the microcode versions across different models: within a model the numbers at least seem to increase with newer microcodes, but between models the pattern doesn't hold, so it is entirely possible that 0x9a on CoffeeLake is at least as new as 0xc6 on Skylake. I haven't found a good list anywhere, or a way to see the date embedded in the microcode. At least from some PDFs released by Intel 0x9a is pretty new since the most recent version mentioned by Intel that I could find is 0x96 for most Coffee Lake chips.




> A weird thing was that if the browser remained open (with RWT) while running the test, randomly
> a few values were lower than usually, i.e. 1.x and once I have seen a value that looked like a
> negative number displayed as an unsigned value, so some sort of underflow must have occurred.
> I believe that those were artifacts due to thread migration between cores on a non-idle CPU.

I have seen this effect myself fairly frequently, including the "very large value", also correlated with load, e.g., if I refresh a webpage - but I can't find the bug. The test pins itself to CPU 1 before starting, so there should be no CPU migration, although there may be context switches when the system is under load. There must be a bug hiding somewhere in my code, or else the clock is sometimes going backwards. I'm using std::chrono::high_resolution_clock, which ultimately uses something like clock_gettime(), which is not guaranteed to be monotonic, so maybe it is going backwards.

>
>
> On this Coffee Lake I have run the test many times and it usually looked like this. However,
> one single time, a single value of all displayed values was around 18 cycles.
>
> So whatever happens which results in that time, probably also happens on these processors with
> a newer microcode, but only very seldom, not at every test as on the one with an old microcode.

Thanks. It's worth noting that by default each value is the minimum observed value, so if both fast and slow results occur with high probability, you'll usually see the fast value. In my experience on this same Skylake box, usually the fast or slow state would persist for some seconds, so you could still see slow results even with "min".

You can reverse the behavior, showing the max value by setting W_MAX envvar to 1, like so:

W_MAX=1 ./offset-test.sh

If you have the chance to run the CoffeeLake test again like this I would be very interested.
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
Why does writing to non-sequential lines in L2 perform so poorly?Travis2017/12/20 02:44 PM
  Bridges? Wells? (NT)Micahel S2017/12/20 03:53 PM
    Bridges? Wells? (NT)Travis2017/12/20 04:46 PM
      That should say "huh"? (NT)Travis2017/12/20 04:46 PM
        That should say "huh"?Jeff S.2017/12/20 05:11 PM
          That should say "huh"?Travis2017/12/20 06:34 PM
    Bridges? Wells?Jeff S.2017/12/20 05:17 PM
      Bridges? Wells?Travis2017/12/20 06:37 PM
    Bridges, Wells - positiveMichael S2017/12/21 02:52 AM
      Bridges, Wells - positiveTravis2017/12/21 09:35 AM
        Bridges, Wells - positiveMichael S2017/12/21 10:00 AM
  Why does writing to non-sequential lines in L2 perform so poorly?Linus Torvalds2017/12/20 06:18 PM
    Why does writing to non-sequential lines in L2 perform so poorly?Travis2017/12/20 06:54 PM
      Why does writing to non-sequential lines in L2 perform so poorly?Linus Torvalds2017/12/21 12:12 PM
        Why does writing to non-sequential lines in L2 perform so poorly?anon2017/12/22 03:29 AM
          Why does writing to non-sequential lines in L2 perform so poorly?Linus Torvalds2017/12/22 01:16 PM
            Why does writing to non-sequential lines in L2 perform so poorly?Travis2017/12/23 08:48 PM
            Why does writing to non-sequential lines in L2 perform so poorly?Travis Downs2020/06/13 03:18 PM
              Why does writing to non-sequential lines in L2 perform so poorly?John D. McCalpin2020/06/18 12:50 PM
                Why does writing to non-sequential lines in L2 perform so poorly?Travis Downs2020/06/18 05:32 PM
                  Why does writing to non-sequential lines in L2 perform so poorly?Travis Downs2020/06/18 05:34 PM
    Why does writing to non-sequential lines in L2 perform so poorly?anon.12017/12/21 06:09 PM
      Why does writing to non-sequential lines in L2 perform so poorly?Linus Torvalds2017/12/22 01:20 PM
        Why does writing to non-sequential lines in L2 perform so poorly?Travis2017/12/24 02:09 PM
  Why does writing to non-sequential lines in L2 perform so poorly?Travis2017/12/20 08:52 PM
    Why does writing to non-sequential lines in L2 perform so poorly?Adrian2017/12/21 12:09 AM
      Why does writing to non-sequential lines in L2 perform so poorly?Travis2017/12/21 09:23 AM
    Why does writing to non-sequential lines in L2 perform so poorly?-.-2017/12/27 03:53 AM
      Why does writing to non-sequential lines in L2 perform so poorly?-.-2017/12/27 03:53 AM
        Why does writing to non-sequential lines in L2 perform so poorly?Travis2017/12/27 04:18 PM
  Why does writing to non-sequential lines in L2 perform so poorly?Etienne2017/12/21 02:36 AM
    Why does writing to non-sequential lines in L2 perform so poorly?Michael S2017/12/21 02:58 AM
      Why does writing to non-sequential lines in L2 perform so poorly?Travis2017/12/21 09:26 AM
        Michael ignore my last question - saw your other reply (NT)Travis2017/12/21 09:27 AM
  Why does writing to non-sequential lines in L2 perform so poorly?Nksingg2017/12/26 06:47 AM
    Why does writing to non-sequential lines in L2 perform so poorly?David Kanter2017/12/26 11:48 AM
    Why does writing to non-sequential lines in L2 perform so poorly?Travis2017/12/27 04:33 PM
  Cannot reproduce with microcode 0xc6Travis Downs2019/02/26 04:23 PM
    Cannot reproduce with microcode 0xc6Adrian2019/02/26 09:35 PM
    Cannot reproduce with microcode 0xc6Adrian2019/02/26 10:07 PM
    Cannot reproduce with microcode 0xc6Adrian2019/02/27 05:02 AM
      Cannot reproduce with microcode 0xc6Travis Downs2019/02/27 08:25 AM
        Cannot reproduce with microcode 0xc6Adrian2019/02/28 01:16 AM
          Cannot reproduce with microcode 0xc6Travis Downs2019/03/07 06:51 PM
        Cannot reproduce with microcode 0xc6Adrian2019/02/28 09:54 AM
          Cannot reproduce with microcode 0xc6Travis Downs2019/03/24 06:34 PM
    Cannot reproduce with microcode 0xc6Travis Downs2019/02/27 03:20 PM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell purple?