[SSI] openssi/kernel/include/cluster/ssi/mosixll balance.h, 1.7, 1.8 defs.h, 1.7, 1.8 mosixtask.h, 1.9, 1.10 routines.h, 1.8, 1.9
Roger Tsang <[email protected]> Mon, 25 Oct 2010 05:50:43 +0000
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/mosixll
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv11623/include/cluster/ssi/mosixll
Modified Files:
Tag: OPENSSI-FC
balance.h defs.h mosixtask.h routines.h
Log Message:
- Reduce amount of work in interrupt context.
- Offload mosix_snap_load() to bottom half. Actual work is moved to do_mosix_snap_load().
- Invoke do_mosix_snap_load() every MF user ticks instead of every system tick.
- Move mosix_calc_process_loads() back to mosix_calc_load() which runs in process context in OpenSSI.
- Fix compute_freemem() might reset value of exported freemem if below UTIL_TOLERANCE.
- In choose() re-adjust bestpri and mintime values since MF appears to be based on USER_HZ. 2.6.11 kernel HZ is 1000.
- No longer need acpuse_lock since acpuse value is "constant".
- Remove mosix_task->page_allocs. Not used.
- Fix invalid mosix_task->load value due to invalid mosix_task->ran that is calculated from load_ticks which is not reset prior the next mosix_task->ran calculation. In OpenSSI mosix_calc_load() resets load_ticks, but mosix_task->ran is calculated many times in another thread before load_ticks is reset. In this fix we use Linux ctime/stime from task_struct instead of load_ticks.
- Optimize away runqueue lock if possible in mosix_calc_process_loads().
- Change load_left_lock semaphore to spinlock. This lock used to protect other global variables from multiple mosix_calc_load() threads, but we reduced the number of mosix_calc_load() threads to one.
- Fix choose() and consider() skipped system CPU time.
- Fix update_load_array() filling master_load_array after incrementing load_cnt could race with nm_master_send(). When nm_master_send() lost the race CLMS clients would see incorrect ncpus and speed in loadinfo structure.
- Defer Mosix choose() and mchoose() to Linux work queue instead of nsc_async_queue.
- Fix mosix_do_add_to_whereto() race with age_balancing(). If age_balancing() won the race wake_up_mosix() could be using stale task struct which might cause memory corruption.
cluster/ssi/mosixll/balance.c | 316 +++++++++++-------------
cluster/ssi/mosixll/freemem.c | 15 -
cluster/ssi/mosixll/info.c | 17 -
cluster/ssi/mosixll/kernel.c | 15 -
cluster/ssi/mosixll/load.c | 246 +++++++++---------
cluster/ssi/util/load_level.c | 87 ++++--
include/cluster/ssi/mosixll/balance.h | 3
include/cluster/ssi/mosixll/defs.h | 4
include/cluster/ssi/mosixll/mosixtask.h | 5
include/cluster/ssi/mosixll/routines.h | 1
10 files changed, 368 insertions(+), 341 deletions(-)
Index: defs.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/mosixll/defs.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- defs.h 17 Nov 2009 06:09:02 -0000 1.7
+++ defs.h 25 Oct 2010 05:50:41 -0000 1.8
@@ -143,6 +143,10 @@
#define DEFAULT_FAST_ALPHA (DECAY_QUOTIENT * 926 / 1000)
#define MF 50 /* MOSIX frequency */
+#ifdef CONFIG_SSI
+#include <linux/sched.h>
+#define MOSIX_SNAP_FREQ ((MF * HZ + USER_HZ - 1) / USER_HZ) /* kernel HZ */
+#endif
#define MILLION 1000000
#define DMILLION 1000000.0
Index: mosixtask.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/mosixll/mosixtask.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- mosixtask.h 18 Nov 2009 06:16:53 -0000 1.9
+++ mosixtask.h 25 Oct 2010 05:50:41 -0000 1.10
@@ -56,9 +56,8 @@
#endif
int64_t dctime; /* decayed user-time (ms) */
short decay; /* decay factor (out of DECAY_QUOTIENT) */
- int page_allocs; /* page allocation requests decaying counter */
- unsigned long ran; /* ticks running during last second */
- unsigned long runstart;/* "load_ticks" (+1) since running */
+ unsigned long ran; /* clock_t CPU used since last snap */
+ unsigned long runstart; /* SSI_XXX: cputime_t */
unsigned long load; /* estimated contribution to load */
};
#else /* !CONFIG_SSI */
Index: balance.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/mosixll/balance.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- balance.h 25 Oct 2010 05:01:38 -0000 1.7
+++ balance.h 25 Oct 2010 05:50:41 -0000 1.8
@@ -107,9 +107,8 @@
#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 spinlock_t load_left_lock; /* protect load_left */
extern unsigned long load_left; /* load of processes that just left */
#else
extern unsigned acpuse; /* accumulated cpu utilization */
Index: routines.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/mosixll/routines.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- routines.h 18 Nov 2009 06:16:53 -0000 1.8
+++ routines.h 25 Oct 2010 05:50:41 -0000 1.9
@@ -61,6 +61,7 @@
extern void mosix_load_init(void);
extern void load_balance(void);
#ifdef CONFIG_SSI
+extern unsigned long altload(unsigned long, unsigned long, int);
extern void consider(int, clusternode_t *);
extern void release_migrations(int, unsigned long);
#else
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev