[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1296472031.15234.367.camel@laptop>
Date: Mon, 31 Jan 2011 12:07:11 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Glauber Costa <glommer@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
aliguori@...ibm.com, Rik van Riel <riel@...hat.com>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>,
Avi Kivity <avi@...hat.com>, tglx <tglx@...utronix.de>
Subject: Re: [PATCH v2 2/6] KVM-HV: KVM Steal time implementation
On Fri, 2011-01-28 at 14:52 -0500, Glauber Costa wrote:
> + u64 to = (get_kernel_ns() - vcpu->arch.this_time_out);
> + /*
> + * using nanoseconds introduces noise, which accumulates easily
> + * leading to big steal time values. We want, however, to keep the
> + * interface nanosecond-based for future-proofness.
> + */
> + to /= NSEC_PER_USEC;
> + to *= NSEC_PER_USEC;
This just doesn't make any sense at all, you use the most expensive and
accurate kernel interface to get ns resolution timestamps (ktime_get),
and then you truncate the stuff to usec for some totally weird and
unexplained reason.
If ktime_get is wrong all our time-keeping is out the window.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists