[SSI] openssi/kernel/include/linux config.h, 1.27, 1.28 dpvproc.h, 1.17, 1.18 mosix.h, 1.3, 1.4 nd_origin.h, 1.6, 1.7 proc_fs.h, 1.5, 1.6 shm.h, 1.10, 1.11 smp_lock.h, 1.6, 1.7 vproc.h, 1.26, 1.27
Roger Tsang <[email protected]>
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/include/linux
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16224/kernel/include/linux
Modified Files:
Tag: OPENSSI-FC
config.h dpvproc.h mosix.h nd_origin.h proc_fs.h shm.h
smp_lock.h vproc.h
Log Message:
Bug fixes and enhancements. See ChangeLog.
Index: config.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/config.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- config.h 24 Mar 2009 04:26:29 -0000 1.27
+++ config.h 27 Oct 2009 03:18:30 -0000 1.28
@@ -16,7 +16,7 @@
/* Port remaining CFS to 2.6 */
#define CFS_EXPORT_OPS
#define CFS_SETATTR_LAZY_FLUSH
-#define CFSD_COMMIT
+/* #define CFSD_COMMIT */
#define CFSD_OPEN
#define CFS_SETATTR_LAZY
@@ -46,7 +46,7 @@
#define IPC_SHM_RACE_FIX
#define VPROC_REBOOT_SECONDARY_MASTER_NM_DISABLE
#define PROC_TASK_LOOKUP_FIX
-#define IPCNAME_GETID__IO_ID_RACE_FIX
+/* #define IPCNAME_GETID__IO_ID_RACE_FIX */
#define IPC_SHM_DESTROY_FIX
#ifdef VPROC_DEPRECIATE_CT_TO_X
@@ -71,16 +71,17 @@
#endif
#define IPC_RMTUNIX_CLEAR_DEAD_SOCK_QUEUE
-#define CONFIG_SSI_LOADINFO_RLOAD
+/* Define the following line to revert to original load calculation */
+/* #define CONFIG_SSI_LOADINFO_RLOAD */
#define VPROC_HOLD_ZERO_GET_TASK
#ifdef VPROC_HOLD_ZERO_GET_TASK
/* for glibc unit test tst-basic3.c */
# define GLIBC_TST_BASIC3
+# define PPROC_SETCTTY_SIGLOCK
#endif
#define LINUX_SSI_EVENT
-#define PPROC_SETCTTY_SIGLOCK
#define RMTFB_GETCLI_ID__RFB_SERVER_INVAL_FIX
#define VPROC_RMV_FROM_ORIGINALCHILD_LIST_CANT_FIND_CHILD_FIX
#define VPROC_MIGRATE_THREAD_GROUP_FIX
@@ -96,6 +97,12 @@
#define SSI_RW_VERIFY_AREA_FIX
#define VPROC_LOCKING_CONTEXT_FIX
#define VPROC_CARECOUNT_FIX
+#define REXEC_LOADTABLE_RACE_FIX
+#define CFS_UMASK_FIX
+
+#ifdef IPC_SHM_RACE_FIX
+# define IPC_SHM_LOCK_DEST_FIX
+#endif
/*
* Experimental
@@ -104,9 +111,6 @@
#define RMTUNIX__SENDMSG_IOVECS
#define RMTSOCK_SENDMSG_IOVECS
#define SSI_CFS_NEGDCACHE
-#ifdef REOP_EXPORT_PATH_SVRNODE
-# define SSI_SOCK_REOP_TYPE
-#endif
#ifdef CFSD_OPEN
# define CFS_READAHEAD
@@ -161,7 +165,7 @@
#ifdef GLIBC_TST_BASIC3
/* wait for children of other threads in group unless __WNOTHREAD */
-/* # define VPROC_VPROC_WNOTHREAD */
+# define VPROC_VPROC_WNOTHREAD
#endif
#ifdef VPROC_RELEASE__REFCNT_RACE_FIX
@@ -205,15 +209,6 @@
#endif
#define NSC_ASYNC_LINUX_LIST
-
-#ifdef CFS_PAGEVEC
-/* Avoid remote scatter/gather I/O. Not enabled by default. */
-#if 0
-# define CFS_PAGEVEC_BUFFER_READ
-# define CFS_PAGEVEC_BUFFER_WRITE
-#endif
-#endif
-
#define NSC_ASYNC_SLAB_NOFS__FLAG
#ifdef VOD_HLIST
@@ -251,12 +246,12 @@
#define LINUX_SSI_INTERRUPTIBLE
#if defined(LINUX_SSI_INTERRUPTIBLE) && defined(CFSTOKHOLD_LINUX_LIST) && defined(CFS_ZAP_CACHES)
-/* NOTYET need to prevent pre-emptive req_release # define CFSTOK_INTR */
+# define CFSTOK_INTR
#endif
#define RMTUNIX_SOCK_INFO_CACHE
#define NSC_IPC_RWLOCK_DOWNGRADE
-/* NOTYET #define SSI_LOOKUP_DENTRY_HASH */
+#define SSI_LOOKUP_DENTRY_HASH
#if defined(LINUX_SSI_INTERRUPTIBLE) && defined(KERNEL2616_53)
# define CFS_INTR
@@ -278,11 +273,66 @@
#define CFS_BDI
#endif
+#define VPROC_CAREDATA_KMEM_CACHE
+#define VPROC_CAREHEAD_KMEM_CACHE
+
+#if defined(VPROC_HOLD_ZERO_GET_TASK) && defined(VPROC_LIST_SPINLOCK) && defined(LOADLEVEL_TABLE_LIST)
+# define TASK_HOLD_VPROC
+#endif
+
+#define VPROC_MOVE_HEADER_KMEM_CACHE
+#define VPROC_RCU_MOVEMENT_LIST
+#define VPROC_MOVE_DATA_KMEM_CACHE
+
+#ifdef REXEC_LOADTABLE_RACE_FIX
+# define MASTER_LOAD_ARRAY_SEND_SIZE
+#endif
+
+#define CFS_IOCTL
+
+#ifdef REXEC_LOADTABLE_RACE_FIX
+# define REXEC_LOADTABLE_FAST
+#endif
+
+#ifdef VPROC_VPROC_WNOTHREAD
+# define VPROC_VPROC_WNOTHREAD__SNAPSHOT
+#endif
+
+#ifdef RCU_MSGSUP
+# define RCU_MSGSUP_HASH
+#endif
+
+#ifdef CFS_PAGEVEC
+# define ICS_TCP_SENDPAGE
+# ifdef ICS_TCP_SENDPAGE
+# define ICS_OOL_STRUCT_PAGES
+# endif
+#endif
+
+#define DYNAMIC_NSC_ASYNC_DAEMONS
+
+#ifdef NSC_ASYNC_ARGS_ZERO_COPY
+# if defined(CFS_PAGEVEC) && defined(NSC_ASYNC_LINUX_LIST)
+# define CFS_ASYNC_QUEUE
+# endif
+#endif
+
+#ifdef CFS_ASYNC_QUEUE
+# define CFS_COMMIT_DOWN
+#endif
+
+#ifdef ICS_OOL_STRUCT_PAGES
+# define CFS_IOVEC
+# define CFS_PAGES_CACHE
+#endif
+
/*
* High-Availability / Failover
*/
#define SHRINK_ICACHE_SB
#define CFS_MIGRATE_ACTIVE_PFS
+#define CFS_CLIST_LLIST
+#define CFS_CHARD_RACE_FIX
/*
* Fixes for OOO store capable CPUs
@@ -294,15 +344,18 @@
/*
* Workarounds
*/
-#ifndef CFS_BDI
+/* #ifndef CFS_BDI */
+/* SSI: We still need this for client@server */
#define CFS_WRITEPAGES_AT_SVR_SKIP_BDI
-#endif
+/* #endif */
/*
* Debug
*/
-/* RFBDEBUG */
-/* REOPDEBUG */
+/* #define RFBDEBUG */
+/* #define REOPDEBUG */
+/* #define DEBUG_MOSIX_LL */
+#define DEBUG_LDLVL
/*
* Disabled / Deprecated
@@ -329,6 +382,11 @@
# define CFS_PAGEVEC_PAGE_ORDER
#endif
*/
+/*
+#ifdef REOP_EXPORT_PATH_SVRNODE
+# define SSI_SOCK_REOP_TYPE
+#endif
+*/
#endif /* CONFIG_SSI */
Index: proc_fs.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/proc_fs.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- proc_fs.h 7 Aug 2007 03:06:14 -0000 1.5
+++ proc_fs.h 27 Oct 2009 03:18:30 -0000 1.6
@@ -238,9 +238,8 @@
struct proc_inode {
#ifdef CONFIG_SSI
struct vproc *vproc;
-#else
- struct task_struct *task;
#endif
+ struct task_struct *task;
int type;
union {
int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **);
Index: mosix.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/mosix.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mosix.h 20 Oct 2004 03:23:37 -0000 1.3
+++ mosix.h 27 Oct 2009 03:18:30 -0000 1.4
@@ -26,7 +26,11 @@
extern int mosix_go_home(int);
extern int mosix_go_home_for_reason(int, int);
extern int stay_me_and_my_clones(uint32_t);
+#ifdef CONFIG_SSI
+extern void mosix_snap_load(unsigned long);
+#else
extern void mosix_snap_load(int);
+#endif
extern int mosix_fork_init_fields(struct task_struct *);
extern void mosix_fork_free_fields(struct task_struct *);
Index: nd_origin.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/nd_origin.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- nd_origin.h 24 Mar 2009 04:26:29 -0000 1.6
+++ nd_origin.h 27 Oct 2009 03:18:30 -0000 1.7
@@ -67,9 +67,7 @@
#endif
-#ifdef RCU_VPROC_ORIGIN_LIST
-extern spinlock_t vproc_origin_list_lock;
-#else
+#ifndef RCU_VPROC_ORIGIN_LIST
extern RW_LOCK_T vproc_origin_list_lock;
#endif
Index: shm.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/shm.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- shm.h 24 Mar 2005 19:54:56 -0000 1.10
+++ shm.h 27 Oct 2009 03:18:30 -0000 1.11
@@ -107,6 +107,7 @@
#define SHM_LOCKED 02000 /* segment will not be swapped */
#define SHM_HUGETLB 04000 /* segment will use huge TLB pages */
#ifdef CONFIG_SSI
+/* SSI_XXX: no room for SHM_LOCK_DEST */
#define SHM_LOCK_DEST 10000 /* obj locked for destroy */
#endif /* CONFIG_SSI */
Index: smp_lock.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/smp_lock.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- smp_lock.h 7 Aug 2007 03:06:14 -0000 1.6
+++ smp_lock.h 27 Oct 2009 03:18:30 -0000 1.7
@@ -43,6 +43,7 @@
extern void __lockfunc unlock_kernel(void) __releases(kernel_lock);
#ifdef CONFIG_MOSIX_LL
+#if defined(CONFIG_MOSIX_DIAG) && defined(CONFIG_SMP)
/* the big MOSIX lock resembles the big kernel lock in the way it is
* allowed to be locked multiple times. It is not allowed, however,
* to remain locked when entering "schedule".
@@ -60,6 +61,7 @@
if (--current->mosix.lock_depth < 0)
spin_unlock(&mosix_flag);
}
+#endif
#endif /* CONFIG_MOSIX_LL */
#else
@@ -71,8 +73,10 @@
#define kernel_locked() 1
#ifdef CONFIG_MOSIX_LL
+#if defined(CONFIG_MOSIX_DIAG) && defined(CONFIG_SMP)
#define lock_mosix() do { } while(0)
#define unlock_mosix() do { } while(0)
+#endif
#endif /* CONFIG_MOSIX_LL */
#endif /* CONFIG_LOCK_KERNEL */
Index: dpvproc.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/dpvproc.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- dpvproc.h 24 Mar 2009 04:26:29 -0000 1.17
+++ dpvproc.h 27 Oct 2009 03:18:30 -0000 1.18
@@ -239,10 +239,9 @@
*/
#define PV_IS_LOCAL (PV_PROCESS|PV_PGRPLEADER|PV_SESSIONLEADER)
#ifdef VPROC_HOLD_ZERO_GET_TASK
-#define PV_IS_ALIVE(pvp) (VPROCPTR_VALID(VP(pvp)) && \
+#define PV_IS_ALIVE(pvp) (VP_HASHED(VP(pvp)) && \
((pvp)->pvp_flag & PV_IS_LOCAL) && \
- (pvp)->pvp_pproc && \
- pid_alive((pvp)->pvp_pproc))
+ (pvp)->pvp_pproc && pid_alive((pvp)->pvp_pproc))
#endif
/*
@@ -330,6 +329,9 @@
char mh_timeout;
char mh_aborting;
wait_queue_head_t mh_wqh;
+#ifdef VPROC_RCU_MOVEMENT_LIST
+ struct rcu_head mh_rcu;
+#endif
};
struct move_data {
@@ -547,6 +549,8 @@
#define VPROC_LOCK_PGRP_LIST_INIT(v) do { \
INIT_RW_LOCK(&PVP((v))->pvp_pgrp_list_lock); \
} while(0)
+#define VPROC_LOCK_PGRP_LIST_EXCL_HELD(v) \
+ LOCK_EXCL_RW_LOCKOWNED(&PVP((v))->pvp_pgrp_list_lock)
#define VPROC_LOCK_PGRP_LIST_EXCL(v,s) do { \
VPROC_LOCK_DEBUG(v,s,"lock pgrp list"); \
LOCK_EXCL_RW_LOCK(&PVP((v))->pvp_pgrp_list_lock); \
@@ -555,6 +559,10 @@
VPROC_LOCK_DEBUG(v,s,"unlock pgrp list"); \
UNLOCK_EXCL_RW_LOCK(&PVP((v))->pvp_pgrp_list_lock); \
} while(0)
+#define VPROC_LOCK_PGRP_LIST_DOWNGRADE(v,s) do { \
+ VPROC_LOCK_DEBUG(v,s,"downgrade pgrp list"); \
+ DOWNGRADE_RW_LOCK(&PVP((v))->pvp_pgrp_list_lock); \
+ } while(0)
#define VPROC_LOCK_PGRP_LIST_SHARED(v,s) do { \
VPROC_LOCK_DEBUG(v,s,"lock pgrp list"); \
LOCK_SHR_RW_LOCK(&PVP((v))->pvp_pgrp_list_lock); \
Index: vproc.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/vproc.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- vproc.h 24 Mar 2009 04:26:29 -0000 1.26
+++ vproc.h 27 Oct 2009 03:18:30 -0000 1.27
@@ -50,7 +50,7 @@
SPIN_LOCK_T vp_ref_cnt_lock; /* lock for reference counting */
#else
atomic_t vp_ref_cnt; /* vproc usage count */
- SPIN_LOCK_T vp_ref_cnt_lock; /* lock for vproc magic */
+ SPIN_LOCK_T vp_lock; /* lock for vp_magic */
#ifdef VPROC_RCU_LIST
struct rcu_head vp_rcu; /* callback structure for RCU */
#ifdef VPROC_LIST_SPINLOCK
@@ -60,6 +60,11 @@
#endif /* ATOMIC_VPROC_REFCNT */
int vp_magic; /* magic number id for vproc */
#define VP_MAGIC 0x63727076
+#ifdef TASK_HOLD_VPROC
+ int vp_relse; /* coordinate vproc de-alloc */
+#define VP_GIVEBACK 0xBABECAFE
+#define VP_DEAD 0xBBADF00D
+#endif
#ifdef VPROC_DEBUG
unsigned long vp_index; /* vproc index number */
struct vproc *vp_next; /* static link to next vproc */
@@ -124,19 +129,20 @@
* the origin list lock recusively (via VPROC_IS_AT_ORIGIN()) in
* some nodedown code.
*/
-#define VPROCPTR(pid) (vprocptr(pid, TRUE))
#ifndef VPROC_RCU_LIST
+#define VPROCPTR(pid) (vprocptr(pid, TRUE))
#define VPROCPTR_NOLOCK(pid) (vprocptr(pid, FALSE))
#ifdef VPROC_RELEASE__REFCNT_RACE_FIX
#define VPROCPTR_NOHOLD(pid) (vprocptr(pid, -1))
#endif
#else /* VPROC_RCU_LIST */
+#define VPROCPTR(pid) vprocptr(pid, 1)
#define VPROCPTR_NOLOCK(pid) VPROCPTR(pid)
#ifdef VPROC_RELEASE__REFCNT_RACE_FIX
-#define VPROCPTR_NOHOLD(pid) (vprocptr(pid, 0))
+#define VPROCPTR_NOHOLD(pid) vprocptr(pid, 0)
#endif
#endif /* VPROC_RCU_LIST */
-#define VPROCPTR_VALID(v) (v->vp_magic == VP_MAGIC)
+#define VP_HASHED(v) ((v)->vp_magic == VP_MAGIC)
/* LOCATE_VPROC_PID() option flags */
#define LVP_NOLOCK 0x01
@@ -153,11 +159,14 @@
(*locate_vproc_pid_routine)(pid, str, LVP_ORIGIN)
#ifdef VPROC_RELEASE__REFCNT_RACE_FIX
-extern struct vproc *vproc_hold(struct vproc *, int);
-#else
-extern int vproc_hold(struct vproc *, int);
+extern struct vproc * __vproc_hold_and_check(struct vproc *);
+extern struct vproc * vproc_hold_and_check(struct vproc *);
#endif
+extern int vproc_hold(struct vproc *);
extern int vproc_release(struct vproc *);
+#ifdef TASK_HOLD_VPROC
+void release_vproc(struct task_struct *);
+#endif
/*
* Macros which define the existence rules for a vproc.
*/
@@ -170,14 +179,20 @@
(void) vproc_hold(z))
#else
#define DECREMENT_VP_REFCNT(z, str) (void) vproc_release(z)
-#define INCREMENT_VP_REFCNT(z, str) (void) vproc_hold(z, 0)
+#define INCREMENT_VP_REFCNT(z, str) (void) vproc_hold(z)
#endif /* !VPROC_DEBUG */
#define VPROC_HOLD(v, str) INCREMENT_VP_REFCNT((v), (str))
#define VPROC_RELE(v, str) DECREMENT_VP_REFCNT((v), (str))
#ifdef VPROC_RELEASE__REFCNT_RACE_FIX
-/* SSI_XXX to support VPROC_DEBUG */
-#define VPROC_HOLD_AND_CHECK(v, str) vproc_hold((v), 1)
+#ifdef VPROC_DEBUG
+#define VPROC_HOLD_AND_CHECK(v, str) { \
+ vproc_db4(z, "HOLD", str, +1); \
+ (vproc_hold_and_check((v)) == ESUCCESS); \
+}
+#else
+#define VPROC_HOLD_AND_CHECK(v, str) vproc_hold_and_check(v)
+#endif /* !VPROC_DEBUG */
#define VPROC_RELE_PID(_pid, str) VPROC_RELE(VPROCPTR_NOHOLD(_pid), str)
#else
#define VPROC_RELE_PID(_pid, str) VPROC_RELE(VPROCPTR(_pid), str)
@@ -212,6 +227,7 @@
#endif /* !VPROC_LIST_SPINLOCK */
#endif /* !VPROC_HASH_LIST || VPROC_RCU_LIST */
+#ifndef ATOMIC_VPROC_REFCNT
#define VPROC_REFCNT_LOCK_INIT(v) do { \
INIT_SPIN_LOCK(&(v)->vp_ref_cnt_lock); \
} while(0)
@@ -224,6 +240,7 @@
#define VPROC_REFCNT_LOCK_DEINIT(v) do { \
DEINIT_SPIN_LOCK(&(v)->vp_ref_cnt_lock); \
} while(0)
+#endif /* !ATOMIC_VPROC_REFCNT */
typedef struct procinfo {
@@ -290,8 +307,10 @@
extern struct vproc *vproc_alloc(void);
#ifdef VPROC_RCU_LIST
extern void vproc_dealloc(struct rcu_head *);
+#define free_vproc(_v) call_rcu(&(_v)->vp_rcu, vproc_dealloc)
#else
extern void vproc_dealloc(struct vproc *);
+#define free_vproc(_v) vproc_dealloc(_v)
#endif
extern struct vproc * tnc_locate_vproc_pid(pid_t, char *, int);
extern int vproc_rusage_and_info(struct task_struct *p, struct pusage_dev *pu,
@@ -752,6 +771,10 @@
extern ssize_t do_ssi_maps(struct task_struct *, char *, size_t, loff_t *);
extern long do_ssi_ptrace(long, long, long, long, int *);
extern ssize_t do_ssi_write(struct task_struct *, char *, size_t, loff_t *, int);
+#ifdef TASK_HOLD_VPROC
+extern int vproc_migrate_local(struct vproc *, clusternode_t);
+extern void vproc_migrate(struct vproc *, clusternode_t);
+#endif
extern void proc_migrate(struct task_struct *, clusternode_t);
/* Inline pproc support. */
------------------------------------------------------------------------------
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