All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Harper <ryanh@us.ibm.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] xen: clean up HISTO defines
Date: Wed, 25 May 2005 16:41:53 -0500	[thread overview]
Message-ID: <20050525214153.GD26959@us.ibm.com> (raw)

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 {

                 reply	other threads:[~2005-05-25 21:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050525214153.GD26959@us.ibm.com \
    --to=ryanh@us.ibm.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.