[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190612090257.GF3436@hirez.programming.kicks-ass.net>
Date: Wed, 12 Jun 2019 11:02:57 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: "Jason A. Donenfeld" <Jason@...c4.com>,
LKML <linux-kernel@...r.kernel.org>, clemens@...isch.de,
Sultan Alsawaf <sultan@...neltoast.com>,
Waiman Long <longman@...hat.com>, x86@...nel.org
Subject: Re: infinite loop in read_hpet from ktime_get_boot_fast_ns
On Tue, Jun 11, 2019 at 11:09:20PM +0200, Thomas Gleixner wrote:
> Jason,
>
> On Fri, 7 Jun 2019, Jason A. Donenfeld wrote:
>
> Adding a few more people on cc and keeping full context.
>
> > Hey Thomas,
> >
> > After some discussions here prior about the different clocks
> > available, WireGuard uses ktime_get_boot_fast_ns() pretty extensively.
> > The requirement is for a quasi-accurate monotonic counter that takes
> > into account sleep time, and this seems to fit the bill pretty well.
How quasi? Do the comments in kernel/sched/clock.c look like something
you could use?
As already mentioned in the other tasks, anything ktime will be
horrifically crap when it ends up using the HPET, the code in
kernel/sched/clock.c is a best effort to keep using TSC even when it is
deemed unusable for timekeeping.
Powered by blists - more mailing lists