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

RE: [Xen-ia64-devel] [PATCH] Fix dom0 losing timer interrupt issue


  • To: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Magenheimer, Dan (HP Labs Fort Collins)" <dan.magenheimer@xxxxxx>
  • Date: Thu, 15 Dec 2005 14:36:02 -0800
  • Delivery-date: Thu, 15 Dec 2005 22:38:02 +0000
  • List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
  • Thread-index: AcYBU3gyH8SEqJ1jSaWxtqEBISPfMQAdELyg
  • Thread-topic: [Xen-ia64-devel] [PATCH] Fix dom0 losing timer interrupt issue

Committed.  Excellent debugging!

I only gave this cursory testing because it is clearly a bug
and I and others have seen mysterious freezes in domain0. 

> -----Original Message-----
> From: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf 
> Of Tian, Kevin
> Sent: Thursday, December 15, 2005 1:42 AM
> To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-ia64-devel] [PATCH] Fix dom0 losing timer 
> interrupt issue
> 
> We kept seeing unstable when running multiple domains for a while, and
> finally found dom0 will lose timer interrupt under certain conditions.
> It really took us a whole day to track down the root cause, and now
> system is more stable with attached patch! Brief description as
> following:
> =========================================
> Under some specific conditions, dom0 will lose guest timer interrupt.
> Xen/ia64 will try to pend guest timer interrupt to dom0 within each
> machine timer interrupt handler. To avoid duplicated delivery,
> domain_itm_last recorded domain_itm of last injection. If two are
> identical, it means interrupt injected but guest has not set new itm
> value. Or else
> corresponding pending irr bit will be turned on. That works in most
> cases.
> 
> However currently guest linux may try to set itm multiple times within
> one
> handler before turn on psr.i again. Among first few settings, 
> new guest
> timer
> interrupt may be pended. Then once guest linux enables 
> interrupt, a new
> timer interrupt will be injected immediately. However this 
> injection may
> have
> itc still smaller than the domain_itm set at the last round of last
> handle.
> In this case, guest linux will set same domain_itm as last again.
> However
> since domain_itm_last already equals to domain_itm at last read ivr,
> later
> no guest timer interrupt can be injected any more since Xen always
> thinks
> an instance already injected without guest's response.
> 
> Attahced patch fixed this issue by adding sanity check upon 
> guest timer
> vector when deciding to inject interrupt into dom0. We always compare
> current
> itc with latest domain_itm that guest really wants. So if itc <
> domain_itm
> at this point, we simply clear the pending bit and no injection.
> 
> There's also a small fix to vcpu_read_ivr, where 
> domain_itm_last should
> be updated before clearing irr bit. Or els a small window 
> still remains
> to add a duplicate interrupt.
> 
> Signed-off-by Anthony Xu <anthony.xu@xxxxxxxxx>
> Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>
> 
> Thanks,
> Kevin
> 

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel


 


Rackspace

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