Re: [LGUEST] updated nohz/hrtimer WIP patches (v04)

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

 



On Thu, 29 Mar 2007, Jeremy Fitzhardinge wrote:

> Two things:
> 
>    1. It's probably better to make this interface specified in absolute
>       rather than relative time.  Asking for a timeout "X ns from _now_"
>       is a bit vague if the guest can be preempted and _now_ can be
>       arbitrarily deferred.  The tricky part about using an absolute
>       time is that the guest needs to work out how to convert from a
>       guest time into hypervisor time...

Thanks for the review!

Yep, it's as simple as possible now, and absolute time something to 
investigate along with time synchronization between the host and the 
guest (which we effectively avoid at this point).

>    2. Rather than kicking the timer immediately for too-short (or
>       negative) timeouts, it should have the option to return -ETIME, to
>       match the clockevents set_next_event API.

Ok.

> +static int lguest_clockevent_set_next_event(unsigned long delta,
> +					    struct clock_event_device *evt)
> +{
> +	ktime_t kdelta = ktime_sub(evt->next_event, ktime_get());
> +	hcall(LHCALL_CLOCKEVENT, __pa(&kdelta), 0, 0);
> +	return 0;
> +}
> 
> 
> Why compute kdelta?  Why not just use "delta"?

'delta' is limited to 2^32 nanoseconds on 32-bit, which is not enough to 
be useful (I really don't understand why the API is like this).  So, 
instead, the 64-bit ktime_t delta is derived.



- James
-- 
James Morris
<jmorris@xxxxxxxxx>
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux