Skip to content

[BUG] Monotonic clock does not work on AMD CPUs #2774

@otherscase

Description

@otherscase

Describe the bug
Monotonic clock initialization relies on cpuinfo's model name field. However, this is not guaranteed to work especially on AMD CPUs because the model name does not contain the clock speed.

To reproduce

  1. Build with CFLAGS="-DUSE_PROCESSOR_CLOCK"
  2. Run valkey-server
  3. Error message printed: "monotonic: x86 linux, unable to determine clock rate"

Expected behavior
Monotonic clock initialization should work without errors regardless of which CPU being used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions