Subject: Re: CVS commit: src/sys/arch/xen
To: Jed Davis <jld@NetBSD.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-xen
Date: 03/21/2006 14:53:25
On Mon, Mar 20, 2006 at 08:55:55PM -0500, Jed Davis wrote:
> Looking at them again, they are:
>
> 1) That the cycle counter hasn't gone backwards (or stopped).
> 2) That >1s doesn't seem to have passed, in xen_microtime, since
> the last clock interrupt.
> 3) That hardclock(9) hasn't set the time back nor advanced it by >1s.
>
> Part of my intent here was to avoid the situation that started this,
> where unreasonable values got into cc_microtime, because the underlying
> "hardware" wasn't behaving as assumed, and then passed on into userland.
>
> > i don't think assertions are appropriate for this kind of things.
>
> Looking at this again, I think I agree. But I'm not sure if they should
> become printf's conditionalized on DEBUG, or removed/commented out, or
> something else.
Please leave them as DEBUG printf. The KASSERT would probably cause a panic
for suspend/resume (once we get there), but a printf can help detect if
something goes bad.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--