[SSI] openssi/kernel/include/cluster/ssi/mosixll balance.h, 1.5, 1.6 defs.h, 1.5, 1.6 mosixtask.h, 1.7, 1.8 routines.h, 1.6, 1.7

Roger Tsang <[email protected]>
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/mosixll
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16224/kernel/include/cluster/ssi/mosixll

Modified Files:
      Tag: OPENSSI-FC
	balance.h defs.h mosixtask.h routines.h 
Log Message:
Bug fixes and enhancements. See ChangeLog.


Index: defs.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/mosixll/defs.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- defs.h	20 Apr 2008 05:49:25 -0000	1.5
+++ defs.h	27 Oct 2009 03:18:30 -0000	1.6
@@ -19,11 +19,13 @@
 #ifndef _MOS_DEFS_H
 #define _MOS_DEFS_H
 
-extern int mosix_running;
 #ifdef CONFIG_SSI
+#ifdef SSI_SKIP
 extern int active_cpu_list[];
+#endif
 #else
 extern int active_cpus;
+extern int mosix_running;
 #endif
 
 extern spinlock_t whereto_lock;
@@ -43,7 +45,7 @@
 extern int mosadmin_mode_nomfs;	/* disallow MFS access to this node */
 extern char bootexpel, expel_progress;
 #ifdef SSI_BALANCE_MEMORY
-extern unsigned long latest_free_mem;
+extern volatile unsigned long latest_free_mem;
 #else
 extern int latest_free_mem;
 #endif
@@ -52,7 +54,11 @@
 extern struct task_struct *chosen_for_mdp;
 
 #define	STD_SPD		10000	  /* speed units of a standard processor */
+#ifdef CONFIG_SSI
+extern unsigned long cpuspeed;  /* this node's relative processor speed */
+#else
 extern int cpuspeed;		  /* this node's relative processor speed */
+#endif
 extern int standard_speed;	  /* if sysadmin changes standard-processor */
 extern int PE;			/* MOSIX number for this processor */
 extern int NPE;			/* number of configured MOSIX nodes */

Index: mosixtask.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/mosixll/mosixtask.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- mosixtask.h	20 Apr 2008 05:49:25 -0000	1.7
+++ mosixtask.h	27 Oct 2009 03:18:30 -0000	1.8
@@ -43,7 +43,9 @@
 struct mosix_task
 {
 	volatile uint32_t dflags;	/* distributed (MOSIX) flags */
+#if defined(CONFIG_MOSIX_DIAG) && defined(CONFIG_SMP)
 	int lock_depth;			/* of the mosix_flag */
+#endif
 	volatile uint32_t stay;		/* reasons why process must stay */
 	int64_t pagetime;	/* time waiting for free pages (ms) */
 	int64_t last_consider;	/* user time since last considered migration */
@@ -56,16 +58,16 @@
 	int64_t dctime;		/* decayed user-time (ms) */
 	short decay;		/* decay factor (out of DECAY_QUOTIENT) */
 	int page_allocs;	/* page allocation requests decaying counter */
-	short ran;		/* ticks running during last second */
-	unsigned short runstart;/* "load_ticks" (+1) since running */
-	int load;		/* estimated contribution to load */
+	unsigned long ran;		/* ticks running during last second */
+	unsigned long runstart;/* "load_ticks" (+1) since running */
+	unsigned long load;		/* estimated contribution to load */
 #ifdef SSI_BALANCE_MEMORY
 	unsigned long migpages;		/* # of migrating pages */
 #else
 	int migpages;		/* # of migrating pages */
 #endif
 };
-#else
+#else /* !CONFIG_SSI */
 struct mosix_task
 {
 	volatile uint32_t dflags;	/* distributed (MOSIX) flags */
@@ -186,11 +188,15 @@
 #endif /* CONFIG_MOSIX_FS */
 
 #ifdef CONFIG_SSI
+#if defined(CONFIG_MOSIX_DIAG) && defined(CONFIG_SMP)
 /* only non-zero fields are mentioned: */
 #define MOSIX_INIT_TASK(tsk) .mosix = {			\
 	.lock_depth	= -1				\
 }
 #else
+#define MOSIX_INIT_TASK(tsk)
+#endif /* ! defined(CONFIG_MOSIX_DIAG) && defined(CONFIG_SMP) */
+#else
 /* only non-zero fields are mentioned: */
 #define MOSIX_INIT_TASK(tsk) .mosix = {			\
 	.dreqs		= ATOMIC_INIT(0),		\

Index: balance.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/mosixll/balance.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- balance.h	20 Apr 2008 05:49:25 -0000	1.5
+++ balance.h	27 Oct 2009 03:18:30 -0000	1.6
@@ -94,14 +94,29 @@
 #define	UTIL_TOLLERANCE		8/10	/* under this, sure trashing */
 #define	OLD_SECONDS		60	/* making an untouched page old */
 
+#ifdef CONFIG_SSI
+extern struct loadinfo *loadinfo;
+#else
 extern struct loadinfo loadinfo[INFO_WIN];
+#endif
 
+#ifdef CONFIG_SSI
+extern unsigned long export_load; /* load reported to other processors */
+#else
 extern int export_load;		/* load reported to other processors */
+#endif
 extern int stable_export;	/* machine dependent stabilizing factor */
+#ifdef CONFIG_SSI
+extern rwlock_t acpuse_lock;	/* protect acpuse */
+extern unsigned long acpuse;	/* accumulated cpu utilization */
+extern struct semaphore load_left_lock; /* protect load_left */
+extern unsigned long load_left;	/* load of processes that just left */
+#else
 extern unsigned acpuse;		/* accumulated cpu utilization */
 extern unsigned coming_in;	/* number of arriving processes */
 extern unsigned came_lately4;	/* processes that arrived lately (*4) */
 extern unsigned load_left;	/* load of processes that just left */
+#endif
 extern int standard_speed;	/* yardstick */
 #ifdef CONFIG_MOSIX_RESEARCH
 extern unsigned int io_read_rate; /* the current read rate from block devices */
@@ -112,11 +127,15 @@
 #ifndef CONFIG_MOSIX_TOPOLOGY
 extern struct opcost remote_here;
 #endif /* CONFIG_MOSIX_TOPOLOGY */
+#ifdef CONFIG_SSI
+extern unsigned long load_ticks;
+#else
 extern unsigned load_ticks;
+#endif
 
 #ifdef SSI_BALANCE_MEMORY
 extern unsigned long pages_to_keep_free;	/* # of pages to attempt to keep free */
-extern unsigned long latest_free_mem;	/* in pages */
+extern volatile unsigned long latest_free_mem;	/* in pages */
 #else
 extern int pages_to_keep_free;	/* # of pages to attempt to keep free */
 extern int latest_free_mem;	/* in pages */
@@ -124,6 +143,8 @@
 
 extern rwlock_t loadinfo_lock;
 
+#ifdef SSI_NOTUSED
+#if defined(CONFIG_MOSIX_DIAG) && defined(CONFIG_SMP)
 #define	BUMP_HEAD do { register struct mosix_task *m = &current->mosix; \
 			unsigned long oldcounter; int dobal; \
 			lock_mosix(); \
@@ -149,6 +170,8 @@
 #define	bump_copyin(_n)		bump_statistic_amount(copyin,_n)
 #define	bump_syscalls()		bump_statistics(nsyscalls)
 #define	bump_demandpages()	bump_statistics(ndemandpages)
+#endif
+#endif /* SSI_NOTUSED */
 
 #endif /*__KERNEL__*/
 

Index: routines.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/mosixll/routines.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- routines.h	20 Apr 2008 05:49:25 -0000	1.6
+++ routines.h	27 Oct 2009 03:18:30 -0000	1.7
@@ -26,6 +26,14 @@
  * 5) related to DFSA			 --> include/mos/dfsa.h
  */
 
+#ifdef CONFIG_SSI
+/* task management: */
+
+extern char *desc_mostask(struct mosix_task *);
+extern void mosix_do_add_to_whereto(struct task_struct *, int);
+extern void common_daemon_setup(char *, int);
+extern void neutralize_my_load(int);
+#else
 struct inode;
 struct task_struct;
 struct mosixnet;
@@ -46,6 +54,7 @@
 extern void wait_for_mosix_configuration(int *);
 extern int obtain_mm(void);
 extern void sync_caps(void);
+#endif /* !CONFIG_SSI */
 
 /* load balancing: */
 
@@ -55,9 +64,9 @@
 struct sonstats;
 #ifdef CONFIG_SSI
 extern void consider(int, struct sonstats *, clusternode_t *);
+extern void release_migrations(int);
 #else
 extern void consider(int, struct sonstats *);
-#endif /* CONFIG_SSI */
 extern int send_local_aload(int);
 extern int send_with_miginfo(int, void *, int);
 extern void mosix_local_syscall(void);
@@ -69,8 +78,7 @@
 extern void add_statistics_to_ancesstor(struct task_struct *, struct task_struct *);
 extern void info_update_costs(void);
 extern void info_update_mfscosts(void);
-extern void load_balance(void);
-extern void memory_balance(void);
+#endif /* CONFIG_SSI */
 extern void age_balancing(void);
 #ifdef CONFIG_SSI
 extern void unchoose_me(struct task_struct *);
@@ -81,12 +89,14 @@
 
 /* memory: */
 
+#ifndef CONFIG_SSI
 extern void init_mdp(void);
 extern void compute_freemem(void);
+#endif
 extern int export_mem(void);
 #ifdef SSI_BALANCE_MEMORY
 extern int memory_badly_required(unsigned long *);
-extern int memory_relief_quality(struct task_struct *, unsigned long);
+extern unsigned long memory_relief_quality(struct task_struct *, unsigned long);
 #else
 extern int memory_badly_required(void);
 extern int memory_relief_quality(struct task_struct *, int);
@@ -95,9 +105,10 @@
 
 /* information dissemination: */
 
+extern void info_init(void);
+#ifndef CONFIG_SSI
 extern void init_mosconfig(void);
 extern int mosix_info_daemon(void *);
-extern void info_init(void);
 extern void info_startup(void);
 extern void info_reconfig(void);
 struct mosix_info;
@@ -107,10 +118,12 @@
 extern int balance_get_info(int, struct mosix_info *);
 extern void mosinfo_update_gateways(void);
 extern void this_machine_is_favourite(int);
+#endif /* !CONFIG_SSI */
 extern int mosix_mem_daemon(void *);
 
 /* migration: */
 
+#ifndef CONFIG_SSI
 struct mig_request_h;
 extern int mosix_mig_daemon(void *);
 extern int passto(int, int);
@@ -121,11 +134,13 @@
 extern void mig_set_lock(int);
 extern int count_migrating_pages(void);
 extern void kickstart(void);
+#endif /* !CONFIG_SSI */
 #ifdef SSI_BALANCE_MEMORY
 extern unsigned long run_over_dirty_pages(int (*func)(unsigned long, int), int);
 #else
 extern int run_over_dirty_pages(int (*func)(unsigned long, int), int);
 #endif
+#ifndef CONFIG_SSI
 extern void deputy_startup(void);
 extern int mig_send_request(int, int);
 extern int mig_recv_request(struct mig_request_h **);
@@ -145,7 +160,6 @@
 extern void deputy_communication_failed(void);
 extern void deputy_die_on_communication(void) ATTRIB_NORET;
 
-#ifndef CONFIG_SSI
 /* remote: */
 
 extern int remote_wait(int, void **, int *);
@@ -154,7 +168,6 @@
 extern long remote_standard_system_call(int, struct pt_regs *);
 extern struct file *get_remote_file(int, struct file *, struct dentry *, unsigned long long, off_t, nopage_t);
 extern void remote_disappear(void) __attribute__((noreturn));
-#endif /* !CONFIG_SSI */
 
 /* data cache: */
 
@@ -211,17 +224,20 @@
 extern void deputy_update_remote_decay(void);
 extern void do_decay(void);
 extern void inc_decays(void);
+#endif /* !CONFIG_SSI */
 extern now_t time_now(void);
 #define	time_since(_when_)	(time_now() - (_when_))
 
 /* MOSIX administration: */
 
+#ifndef CONFIG_SSI
 extern int admin_get_mode(int);
 extern int admin_set_mode(int, int);
 extern int expel(int);
 extern int bring(void);
 extern void proc_update_costs(void);
 extern int my_mosix_status(void);
+#endif /* !CONFIG_SSI */
 extern void set_my_cpuspeed(void);
 
 /* debugging: */


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.