Re: TSC improvement

2020-06-15 Thread SAITOH Masanobu
Hi. On 2020/06/15 7:08, Andrew Doran wrote: On Thu, Jun 11, 2020 at 04:50:40AM +, Taylor R Campbell wrote: What's trickier is synchronizing per-CPU timecounters so that they all give a reasonably consistent view of absolute wall clock time -- and so it's not just one CPU that leads while t

Re: TSC improvement

2020-06-14 Thread Andrew Doran
On Thu, Jun 11, 2020 at 04:50:40AM +, Taylor R Campbell wrote: > What's trickier is synchronizing per-CPU timecounters so that they all > give a reasonably consistent view of absolute wall clock time -- and > so it's not just one CPU that leads while the others play catchup > every time they t

Re: TSC improvement

2020-06-10 Thread Taylor R Campbell
> Date: Wed, 10 Jun 2020 23:11:32 + > From: Andrew Doran > > On Tue, Jun 09, 2020 at 05:16:27PM +, Taylor R Campbell wrote: > > > At the same time, I wonder whether we should _also_: > > > > 1. Modify the tsc timecounter so that it uses a global atomic to > >ensure that there is a g

Re: TSC improvement

2020-06-10 Thread Masanobu SAITOH
Hi. On 2020/06/10 4:37, Joerg Sonnenberger wrote: > On Tue, Jun 09, 2020 at 05:16:27PM +, Taylor R Campbell wrote: >> It's great to see improvements to our calibration of the TSC (and I >> tend to agree that cpu_counter should be serializing, so that, e.g., >> cpu_counter(); ...; cpu_counter()

Re: TSC improvement

2020-06-10 Thread Andrew Doran
On Tue, Jun 09, 2020 at 05:16:27PM +, Taylor R Campbell wrote: > It's great to see improvements to our calibration of the TSC (and I > tend to agree that cpu_counter should be serializing, so that, e.g., > cpu_counter(); ...; cpu_counter() reliably measures time taken in the > ellipsis). > >

Re: TSC improvement

2020-06-09 Thread Joerg Sonnenberger
On Tue, Jun 09, 2020 at 05:16:27PM +, Taylor R Campbell wrote: > It's great to see improvements to our calibration of the TSC (and I > tend to agree that cpu_counter should be serializing, so that, e.g., > cpu_counter(); ...; cpu_counter() reliably measures time taken in the > ellipsis). I'm p

Re: TSC improvement

2020-06-09 Thread Taylor R Campbell
It's great to see improvements to our calibration of the TSC (and I tend to agree that cpu_counter should be serializing, so that, e.g., cpu_counter(); ...; cpu_counter() reliably measures time taken in the ellipsis). At the same time, I wonder whether we should _also_: 1. Modify the tsc timecoun

TSC improvement

2020-06-09 Thread SAITOH Masanobu
Hi, all. I wrote a code to improve x86's TSC.x86/tsc.c rev. 1.67 reduced cache problem, but it still has room. I measured the effect of lfence, mfence, cpuid and rdtscp. The impact to TSC skew and/or drift is: AMD: mfence > rdtscp > cpuid > lfence-serialize > lfence = nomodify