[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHmME9pOWk_ZteUZc_PT19rMn1kfYcXtmLcyAy5sncdV1tNuiQ@mail.gmail.com>
Date: Thu, 13 Jun 2019 17:18:50 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>,
Clemens Ladisch <clemens@...isch.de>,
Sultan Alsawaf <sultan@...neltoast.com>,
Waiman Long <longman@...hat.com>, X86 ML <x86@...nel.org>
Subject: Re: infinite loop in read_hpet from ktime_get_boot_fast_ns
Hey Arnd, Peter,
On Wed, Jun 12, 2019 at 4:01 PM Arnd Bergmann <arnd@...db.de> wrote:
> Documentation/core-api/timekeeping.rst describes the timekeeping
> interfaces. I think what you want here is ktime_get_coarse_boottime().
>
> Note that "coarse" means "don't access the hardware clocksource"
> here, which is faster than "fast", but less accurate.
>
> This is updated as often as "jiffies_64", but is in nanosecond resolution
> and takes suspended time into account.
Oh, thanks. Indeed ktime_get_coarse_boottime seems even better. It's
perhaps a bit slower, in that it has that seqlock, but that might give
better synchronization between CPUs as well.
Peter - any immediate downside you can think of compared to local_clock()?
Jason
Powered by blists - more mailing lists