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

Re: [Xen-devel] [PATCH] VMX: wbinvd when vmentry under UC



>>> On 25.11.13 at 17:39, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> On 25/11/13 16:14, Liu, Jinsong wrote:
>> +/*
>> + * wbinvd is a _very_ time consuming operation, so
>> + * 1. wbinvd ... timer has a good possibility to expire while
>> + *    irq disabled, it then would be delayed until
>> + * 2. ... vmentry back to guest (and irq enalbed), timer interrupt
>> + *    then occurs and drops guest at once;
>> + * 3. drop to hypervisor ... then vmentry and wbinvd again;
>> + *
>> + * This loop will run again and again, until lucky enough wbinvd
>> + * happens not to expire timer and then loop break, usually it would
>> + * occur 10K~60K times, blocking guest 10s~60s.
>> + *
>> + * reprogram timer to avoid dead_like_loop.
>> + */
>> +static inline void uc_wbinvd_and_timer_adjust(void)
>> +{
>> +    reprogram_timer(0);
>> +    wbinvd();
>> +    reprogram_timer(NOW() + MILLISECS(1));
> 
> Do you have any number of the time delta across the wbinvd() ?
> 
> As it currently stands, I do not think it is reasonable to reprogram the
> timer like this.

Indeed I was wondering too, but didn't get to look in detail at what
consequences would arise from doing this.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.