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-changelog

[Xen-changelog] Fix sched_sedf adjdom to properly clamp the period max v

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix sched_sedf adjdom to properly clamp the period max value.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 17 Mar 2006 18:22:25 +0000
Delivery-date: Fri, 17 Mar 2006 18:24:13 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 03d7b5b2c212f2fe551737855e9c39f00675d06c
# Parent  b8640cd55fd7c761012b5da101f0e77e190d4c62
Fix sched_sedf adjdom to properly clamp the period max value.
Remove temporary debug tracing.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r b8640cd55fd7 -r 03d7b5b2c212 xen/common/sched_sedf.c
--- a/xen/common/sched_sedf.c   Fri Mar 17 09:57:28 2006
+++ b/xen/common/sched_sedf.c   Fri Mar 17 10:00:46 2006
@@ -57,11 +57,9 @@
 #define WEIGHT_PERIOD (MILLISECS(100))
 #define WEIGHT_SAFETY (MILLISECS(5))
 
-/* FIXME: need to validate that these are sane */
-#define PERIOD_MAX ULONG_MAX
-#define PERIOD_MIN (MICROSECS(10))
-#define SLICE_MAX ULONG_MAX
-#define SLICE_MIN (MICROSECS(5))
+#define PERIOD_MAX MILLISECS(10000) /* 10s  */
+#define PERIOD_MIN (MICROSECS(10))  /* 10us */
+#define SLICE_MIN (MICROSECS(5))    /*  5us */
 
 #define IMPLY(a, b) (!(a) || (b))
 #define EQ(a, b) ((!!(a)) == (!!(b)))
@@ -585,11 +583,6 @@
                 curinf->deadl_abs += 
                     DIV_UP(now - curinf->deadl_abs,
                            curinf->period) * curinf->period;
-            if (unlikely(curinf->deadl_abs < now))
-                printk("Fatal scheduler error: %"PRIu64" %"PRIu64" %"PRIu64
-                       " diff=%"PRIu64"\n",
-                       curinf->deadl_abs, now, curinf->period,
-                       now - curinf->deadl_abs);
             ASSERT(curinf->deadl_abs >= now);
             /*give a fresh slice*/
             curinf->cputime = 0;
@@ -1622,9 +1615,8 @@
                  */
                 if ( (cmd->u.sedf.period > PERIOD_MAX) ||
                      (cmd->u.sedf.period < PERIOD_MIN) ||
-                     (cmd->u.sedf.slice  > SLICE_MAX)  ||
-                     (cmd->u.sedf.slice  < SLICE_MIN)  ||
-                     (cmd->u.sedf.slice > cmd->u.sedf.period) )
+                     (cmd->u.sedf.slice  > cmd->u.sedf.period) ||
+                     (cmd->u.sedf.slice  < SLICE_MIN) )
                     return -EINVAL;
                 EDOM_INFO(v)->weight = 0;
                 EDOM_INFO(v)->extraweight = 0;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix sched_sedf adjdom to properly clamp the period max value., Xen patchbot -unstable <=