All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: clean up HISTO defines
@ 2005-05-25 21:41 Ryan Harper
  0 siblings, 0 replies; only message in thread
From: Ryan Harper @ 2005-05-25 21:41 UTC (permalink / raw
  To: xen-devel

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@us.ibm.com


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@us.ibm.com>
---
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 {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-25 21:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-25 21:41 [PATCH] xen: clean up HISTO defines Ryan Harper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.