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

[Xen-devel] [PATCH] linux: fix condition for entering tickless state

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux: fix condition for entering tickless state
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 09 Mar 2007 16:54:17 +0000
Delivery-date: Fri, 09 Mar 2007 08:53:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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
I noticed that timer interrupts were running at full rate regardless
of whether the system was idle.
softlockup_get_next_event() must return the maximum of zero and the
delta to the next event, not the minimum (which is always zero or
negative, yielding zero or a very large positive number as return
value).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: ./patches/linux-2.6.18/softlockup-no-idle-hz.patch
===================================================================
--- ./patches/linux-2.6.18/softlockup-no-idle-hz.patch
+++ ./patches/linux-2.6.18/softlockup-no-idle-hz.patch
@@ -34,7 +34,7 @@ unsigned long softlockup_get_next_event(
 +                      !per_cpu(watchdog_task, this_cpu))
 +              return MAX_JIFFY_OFFSET;
 +
-+      return min_t(long, 0, touch_timestamp + HZ - jiffies);
++      return max_t(long, 0, touch_timestamp + HZ - jiffies);
 +}
 +
  /*



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

<Prev in Thread] Current Thread [Next in Thread>