[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1705222114480.2407@nanos>
Date: Mon, 22 May 2017 21:24:48 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Arnd Bergmann <arnd@...db.de>
cc: Christoph Hellwig <hch@....de>, Tejun Heo <tj@...nel.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
Mark Gross <mark.gross@...el.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-s390 <linux-s390@...r.kernel.org>
Subject: Re: RFC: better timer interface
On Mon, 22 May 2017, Arnd Bergmann wrote:
> On Sun, May 21, 2017 at 8:14 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> > But it's easy enough to provide them. All we need for that is something
> > like
> >
> > unsigned long time_msec;
> >
> > which gets incremented every tick by the appropriate amount of
> > milliseconds.
> >
> > Having that would also allow to replace all the
> >
> > end = jiffies + msec_to_jiffies(xxx);
> >
> > while (time_before(jiffies, end))
> > ....
> >
> > constructs with a milliseconds based machinery. So we can remove all
> > *_to_jiffies() interfaces over time.
>
> A lot of those users could probably just ktime_get()/ktime_before() here,
> as they would by definition not be performance critical.
Right.
> I don't see a way to just tk->tkr_mono.base but with a ktime_get_coarse()
> we could just return the ktime_t of the last tick and not even need a seqlock
> on 64-bit architectures, or have to introduce a new API.
Yeah, that would be possible, but OTOH, for those loop thingies it probably
does not matter at all whether you have the overhead of ktime_get() or
not. We need to look at that stuff deeper.
Thanks,
tglx
Powered by blists - more mailing lists