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] xen: clean up HISTO defines

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xen: clean up HISTO defines
From: Ryan Harper <ryanh@xxxxxxxxxx>
Date: Wed, 25 May 2005 16:41:53 -0500
Delivery-date: Wed, 25 May 2005 21:41:17 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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
User-agent: Mutt/1.5.6+20040907i
This patch cleans up the various HISTO defines by moving the controlling
defines to xen/include/xen/sched-if.h.  Also removes the redundant
BUCKET defines.  With this patch, one just picks which HISTO they want
to use and uncomment it in sched-if.h

Compiled and tested for WAKE_HISTO and BLOCKTIME_HISTO.  As I stated
[1]earlier in on the list, the ADV_HISTO won't build since the tree is
missing a header.

1.  http://lists.xensource.com/archives/html/xen-devel/2005-05/msg01036.html

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@xxxxxxxxxx


diffstat output:
 common/sched_sedf.c    |    4 +++-
 common/schedule.c      |   23 +++--------------------
 include/xen/sched-if.h |   10 ++++++++++
 3 files changed, 16 insertions(+), 21 deletions(-)

Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>
---
diff -urN b/xen/common/sched_sedf.c unmodified/xen/common/sched_sedf.c
--- b/xen/common/sched_sedf.c   2005-05-24 22:14:33.000000000 -0500
+++ unmodified/xen/common/sched_sedf.c  2005-05-25 10:23:58.940581819 -0500
@@ -13,7 +13,9 @@
 #include <xen/time.h>
 #include <xen/slab.h>
 
-/*#include <xen/adv_sched_hist.h>*/
+#ifdef ADV_SCHED_HISTO
+#include <xen/adv_sched_hist.h>
+#endif
 
 /*verbosity settings*/
 #define SEDFLEVEL 0
diff -urN b/xen/common/schedule.c unmodified/xen/common/schedule.c
--- b/xen/common/schedule.c     2005-05-24 22:14:32.000000000 -0500
+++ unmodified/xen/common/schedule.c    2005-05-25 10:22:11.695765948 -0500
@@ -13,15 +13,6 @@
  *
  */
 
-/*#define WAKE_HISTO*/
-/*#define BLOCKTIME_HISTO*/
-
-#if defined(WAKE_HISTO)
-#define BUCKETS 31
-#elif defined(BLOCKTIME_HISTO)
-#define BUCKETS 200
-#endif
-
 #include <xen/config.h>
 #include <xen/init.h>
 #include <xen/lib.h>
@@ -36,22 +27,14 @@
 #include <xen/trace.h>
 #include <xen/mm.h>
 #include <public/sched_ctl.h>
+#ifdef ADV_SCHED_HISTO
+#include <xen/adv_sched_hist.h>
+#endif
 
 /* opt_sched: scheduler - default to Borrowed Virtual Time */
 static char opt_sched[10] = "bvt";
 string_param("sched", opt_sched);
 
-/*#define WAKE_HISTO*/
-/*#define BLOCKTIME_HISTO*/
-/*#define ADV_SCHED_HISTO*/
-//#include <xen/adv_sched_hist.h>
-
-#if defined(WAKE_HISTO)
-#define BUCKETS 31
-#elif defined(BLOCKTIME_HISTO)
-#define BUCKETS 200
-#endif
-
 #define TIME_SLOP      (s32)MICROSECS(50)     /* allow time to slip a bit */
 
 /* Various timer handlers. */
diff -urN b/xen/include/xen/sched-if.h unmodified/xen/include/xen/sched-if.h
--- b/xen/include/xen/sched-if.h        2005-05-24 22:14:29.000000000 -0500
+++ unmodified/xen/include/xen/sched-if.h       2005-05-25 10:19:17.471480911 
-0500
@@ -8,8 +8,18 @@
 #ifndef __XEN_SCHED_IF_H__
 #define __XEN_SCHED_IF_H__
 
+/* Pick one. */
 //#define ADV_SCHED_HISTO
+//#define WAKE_HISTO
+//#define BLOCKTIME_HISTO
+
+#if defined(WAKE_HISTO)
+#define BUCKETS 31
+#elif defined(BLOCKTIME_HISTO)
+#define BUCKETS 200
+#elif defined(ADV_SCHED_HIST0)
 #define BUCKETS  10
+#endif
 /*300*/
 
 struct schedule_data {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xen: clean up HISTO defines, Ryan Harper <=