qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] Use CLOCK_MONOTONIC_RAW if available for get_clock().


From: Joe Tanen
Subject: Re: [PATCH v1] Use CLOCK_MONOTONIC_RAW if available for get_clock().
Date: Thu, 30 Sep 2021 19:17:48 +0000

Peter,

Thanks for the quick response. I've informally socialized the issue and will 
update this thread when I get more information.

That aside, I'd find using CLOCK_MONOTONIC_RAW valuable if, e.g., I wanted test 
an NTP daemon inside of a guest and didn't want the host providing an 
already-adjusted timebase. Would the behavior from my patch be more appropriate 
as a command-line option?

v/r
Joe

On 9/30/21, 12:11 PM, "Peter Maydell" <peter.maydell@linaro.org> wrote:

    On Thu, 30 Sept 2021 at 17:04, Joe Tanen <jtanen@fb.com> wrote:
    >
    > CLOCK_MONOTONIC_RAW provides an unadjusted system clock on some platforms,
    > which is closer in spirit to providing a guest with a raw hardware clock 
than
    > CLOCK_MONOTONIC.
    >
    > Using CLOCK_MONOTONIC_RAW also works around a current issue in OSX where
    > CLOCK_MONOTONIC has been observed to go backwards.
    >
    > Since CLOCK_MONOTONIC_RAW might not be available on all platforms, revert 
to
    > using CLOCK_MONOTONIC if it is not present.
    >
    > Signed-off-by: Joe Tanen <jtanen@fb.com>

    I'm not sure we want to change behaviour everywhere to work
    around an OSX bug, though...

    Has this bug been reported to Apple ? Is there some kind of bug
    report ID or URL we can quote in the commit message ?

    -- PMM


reply via email to

[Prev in Thread] Current Thread [Next in Thread]