WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Fix softlockup issue after vcpu hotplug

To: "Graham, Simon" <Simon.Graham@xxxxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix softlockup issue after vcpu hotplug
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 01 Feb 2007 23:58:38 +0000
Delivery-date: Thu, 01 Feb 2007 15:58:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <342BAC0A5467384983B586A6B0B37671048F8F7D@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdESFqDCWsISfq5RGeHgxcxVzRqmQACelaDAAAZiDAAAQnwRAATVWmwABVdeuAAQqkN4AAKff/fAAh92KAAAhEUjgAAKprQAADxHso=
Thread-topic: [Xen-devel] [PATCH] Fix softlockup issue after vcpu hotplug
User-agent: Microsoft-Entourage/11.2.5.060620


On 1/2/07 23:44, "Graham, Simon" <Simon.Graham@xxxxxxxxxxx> wrote:

> I thought about this - the problem is I don't know what the current
> value of the watchdog is, so if stolen is greater than zero, I need to
> do it once immediately and then once every 5s or so in the loop - I cant
> just do it the first n times through the loop because then I might do
> 10s worth of jiffy updates following all the watchdog touches... (BTW -
> the test for NS_PER_TICK*100 was just for the purposes of
> instrumentation)

I don't mean to touch it only every 5s in the loop, I mean to touch it every
time round the loop but only if stolen is greater than five seconds:

while (delta >= NS_PER_TICK) {
    ...;
    if (stolen > <five seconds>)
          touch_softlockup_watchdog();
}  

The point is that you don't want to touch the watchdog whenever you have
small amounts of time stolen from you because that will happen very often
(wakeup latencies, preemption) and cause the watchdog to not do its job
properly and/or in a timely fashion when something *does* go wrong.

If you touch it just about every time you enter the timer ISR you may as
well disable the softlockup mechanism altogether! :-)

The only theoretical problem with this approach is if you got time stolen
that accumulated to more than five seconds, but this happened in two or more
bursts, back-to-back. Then no one stolen period would be enough to trigger
the touch, but also the guest may not be running for long enough to schedule
the softlockup thread. I really don't believe this would be an issue ever in
practise however, given sane scheduling parameters and load on the system.
If the system were loaded/configured so it could happen, the guest would be
in dire straits for other reasons.

 -- Keir



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