From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan Harper Subject: [PATCH] xen: clean up HISTO defines Date: Wed, 25 May 2005 16:41:53 -0500 Message-ID: <20050525214153.GD26959@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 --- 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 #include -/*#include */ +#ifdef ADV_SCHED_HISTO +#include +#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 #include #include @@ -36,22 +27,14 @@ #include #include #include +#ifdef ADV_SCHED_HISTO +#include +#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 - -#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 {