> From: Paul Irofti <p...@irofti.net>
> Date: Sat, 11 Jul 2020 13:50:37 +0300
> 
> On 2020-07-11 13:46, Mark Kettenis wrote:
> >> From: Paul Irofti <p...@irofti.net>
> >> Date: Sat, 11 Jul 2020 13:32:22 +0300
> >>
> >> Hi,
> >>
> >> Getting lots of messages about people loving the new timekeep
> >> functionality, which I am very happy about, but also some that have the
> >> skew too large for it to be enabled.
> >>
> >> I plan on sending a diff next week to improve the situation via RDTSCP
> >> on the machines that have it. Which is basically all modern machines.
> >>
> >> The plan is to have an auxiliary value returned by RDTSCP which
> >> identifies the CPU we got the info from so that we can look-up its
> >> associated skew in a table saved at init inside the timekeep structure:
> > 
> > I think that is the wrong approach.  Instead we should synchronize the
> > TSC counters themselves.  There are special MSRs you can write the
> > offset into IIRC.  That seems to be what FreeBSD does.
> 
> Yes, that is another option. I have not looked to see which are more 
> popular in terms of hardware. Did the MSRs come with RDTSCP? Before? Or 
> after? We should choose the most inclusive solution I guess. Or we could 
> have both...

One thing to keep in mind is that we only use the TSC as a timecounter
on CPUs that have the ITSC feature.

Reply via email to