• AnyOldName3@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    1 day ago

    That’s not exactly it. It’s the game that sleeps (e.g. because it’s waiting for the graphics driver to be ready for more work or there’s a framerate limiter). When it sleeps, the CPU core running that thread temporarily goes to idle speed, then when the sleep finishes, it initially clocks back to a medium speed and only goes back to full speed after it’s run for a while because someone somewhere assumed that processes that sleep of their own volition don’t care if they don’t run quickly. That’s not true for games, so they take longer to prepare the next frame than they should.

    The patch makes it so that if a core goes into the C0 state (maximum speed) and has already been in the C0 state for most of the time for a few milliseconds, it temporarily sets a preference for that core to go straight to full speed after a sleep instead of to medium speed, and doesn’t remove that preference until it’s not been in in C0 for 300ms. That gets rid of the slow start after each frame’s sleep.

    • Die4Ever@retrolemmy.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      13 hours ago

      Wow 300ms is really long in terms of game performance. For gaming they could’ve gotten the desired result with like 50ms.

      I wonder what kind of workloads that number was chosen for (a lot of productivity work is constant for minutes at a time) or if it’s instead based on hardware characteristics (like if it takes more power to clock down and back up than the power used to keep it up for 300ms)