[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] VMX: wbinvd when vmentry under UC
> -----Original Message----- > From: Jan Beulich [mailto:JBeulich@xxxxxxxx] > Sent: Monday, November 25, 2013 8:47 AM > To: Andrew Cooper; Liu, Jinsong > Cc: sherry.hurwitz@xxxxxxx; suravee.suthikulpanit@xxxxxxx; Dugger, > Donald D; Dong, Eddie; Nakajima, Jun; Auld, Will; Zhang, Xiantao; xen- > devel@xxxxxxxxxxxxx; konrad.wilk@xxxxxxxxxx; zhenzhong.duan@xxxxxxxxxx; > keir@xxxxxxx; tim@xxxxxxx > Subject: Re: [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 Basically, increase the timer setting so that it is unlikely to fire during wbinvd() but still be there as a safeguard. Then reset as you are currently doing after wbinvd(). Will _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |