Re: [PATCH v2] timekeeping: get_jiffies_boot_64() for jiffies that include sleep time

2019-06-20 Thread Jason A. Donenfeld
On Wed, Jun 19, 2019 at 10:57 PM Arnd Bergmann wrote: > > On Wed, Jun 19, 2019 at 10:07 PM Jason A. Donenfeld wrote: > > > > On Wed, Jun 19, 2019 at 10:02 PM Arnd Bergmann wrote: > > > > get_jiffies_boot_64 26 > > > > ktime_get_coarse_boottime 26 > > > > ktime_get_boot_fast_ns with tsc 70 > > >

Re: [PATCH v2] timekeeping: get_jiffies_boot_64() for jiffies that include sleep time

2019-06-19 Thread Arnd Bergmann
On Wed, Jun 19, 2019 at 10:07 PM Jason A. Donenfeld wrote: > > On Wed, Jun 19, 2019 at 10:02 PM Arnd Bergmann wrote: > > > get_jiffies_boot_64 26 > > > ktime_get_coarse_boottime 26 > > > ktime_get_boot_fast_ns with tsc 70 > > > ktime_get_boot_fast_ns with hpet 4922 > > > ktime_get_boot_fast_ns

Re: [PATCH v2] timekeeping: get_jiffies_boot_64() for jiffies that include sleep time

2019-06-19 Thread Jason A. Donenfeld
On Wed, Jun 19, 2019 at 10:02 PM Arnd Bergmann wrote: > > get_jiffies_boot_64 26 > > ktime_get_coarse_boottime 26 > > ktime_get_boot_fast_ns with tsc 70 > > ktime_get_boot_fast_ns with hpet 4922 > > ktime_get_boot_fast_ns with acpi_pm 1884 > > > > As expected, hpet is really quite painful. > > I

Re: [PATCH v2] timekeeping: get_jiffies_boot_64() for jiffies that include sleep time

2019-06-19 Thread Arnd Bergmann
On Wed, Jun 19, 2019 at 5:31 PM Jason A. Donenfeld wrote: > > Hi Arnd, > > On Wed, Jun 19, 2019 at 5:08 PM Arnd Bergmann wrote: > > Can you quantify how much this gains you over ktime_get_coarse_boottime > > in practice? You are effectively adding yet another abstraction for time, > > which is

Re: [PATCH v2] timekeeping: get_jiffies_boot_64() for jiffies that include sleep time

2019-06-19 Thread Jason A. Donenfeld
Hi Arnd, On Wed, Jun 19, 2019 at 5:08 PM Arnd Bergmann wrote: > Can you quantify how much this gains you over ktime_get_coarse_boottime > in practice? You are effectively adding yet another abstraction for time, > which is something I'd hope to avoid unless you have a strong reason other > than

Re: [PATCH v2] timekeeping: get_jiffies_boot_64() for jiffies that include sleep time

2019-06-19 Thread Arnd Bergmann
On Wed, Jun 19, 2019 at 4:24 PM Jason A. Donenfeld wrote: > > This enables using the usual get_jiffies_64() but taking into account > time spent sleeping, giving the high performance characteristics of > querying jiffies without the drawback. Can you quantify how much this gains you over

[PATCH v2] timekeeping: get_jiffies_boot_64() for jiffies that include sleep time

2019-06-19 Thread Jason A. Donenfeld
This enables using the usual get_jiffies_64() but taking into account time spent sleeping, giving the high performance characteristics of querying jiffies without the drawback. We accomplish this by precomputing the boottime jiffies offset whenever it is updated, rather than doing the