On Tue, 2007-03-06 at 16:53 -0800, Dan Hecht wrote:Ooops. I completely forgot, that you get the absolute expiry timeOkay. I noticed that but didn't think it was okay to use since it didn't seem like it was set up for the clock_event_device code's use, so seemed like a conceptual interface violation to go digging around in there.
already in ktime_t format (nanoseconds) when dev->set_next_event() is
called.
dev->next_event = expires;
is done right before the call.
So it's already there for free.
Yes it is.
I just wanted to point out that you can use it until I'm awake enough to
implement it proper.
Also, wasn't one of the points of clockevents to prevent the device code from doing conversions between nanoseconds and clicks themselves? Don't we really want the clockevents generic layer to do this conversion between monotonic nanonseconds to absolute device clicks and then give the device code that value, so the device layer doesn't perform any conversions?
Right. But this applies only to deltas, as the conversion of absolute
time values gets ugly, i.e. 128bit math
IMO the paravirt interfaces should use nanoseconds anyway for both
readout and next event programming. That way the conversion is done in
the hypervisor once and the clocksources and clockevents are simple and
unified (except for the underlying hypervisor calls).