Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: proposal: stop using the xen_system_time timecounter in dom0



On Thu, Jun 20, 2024 at 05:22:17PM -0700, Greg A. Woods wrote:
> > Why can't you just set kern.timecounter.hardware to something else
> > if xen_system_time isn't working for you ?
> 
> The bigger problem with that suggestion is that xen_system_time is
> currently implemented as if it were always the ideal timecounter choice
> (with a fixed quality of 10,000), whereas in reality in a dom0 it is
> equivalent to TSC, though with different, and possibly differently
> behaving, code.  On my hardware the real TSC timecounter gets a quality
> of -100 (and it's not even registered by a XEN3_DOM0 kernel, and I don't
> quite understand why not, at least not yet).

Yes, the TSC is not always accessible under Xen, I noticed this.
I think it depends on hardware.

> > [...]
> > The only dom0-specific code I see here is related to timepush and this
> > can't be removed
> 
> I was alluding to the somewhat complex frequency measuring and scaling
> code that goes unused in XEN3_DOMU so long as other assumptions about
> emulated RDTSC always being 1GHz, and indeed always being emulated,
> remain in place.

I don't understand what you're talking about. xen_clock.c already assumes
that xen_timecounter is running at 1Ghz
what «frequency measuring and scaling» are you talking about ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index