[SSI] openssi/kernel/cluster/ssi/vproc dvp_init.c, 1.18, 1.19 dvp_lock.c, 1.8, 1.9 vp_subr.c, 1.23, 1.24
Roger Tsang <[email protected]>
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv18056/cluster/ssi/vproc
Modified Files:
Tag: OPENSSI-FC
dvp_init.c dvp_lock.c vp_subr.c
Log Message:
VPROC (#ifdef VPROC_KMEM_CACHE):
- Allow vproc_alloc() to fail when out of memory.
- Regression:
- Hang due to partially initialized pvp_movement_lock struct when
__SSI_LOCK_DEBUG pragma is set. The pragma is turned off by
default. John Hughes' cluster/ssi/vproc/dvp_lock.c rev1.8 is backed
out to remove redundant initialization when VPROC_KMEM_CACHE is
set.
Index: vp_subr.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/vp_subr.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- vp_subr.c 17 Dec 2009 05:46:50 -0000 1.23
+++ vp_subr.c 2 Feb 2010 05:00:49 -0000 1.24
@@ -164,7 +164,9 @@
* of memory.
*/
#ifdef VPROC_KMEM_CACHE
- v = kmem_cache_alloc(vproc_cachep, GFP_KERNEL|__GFP_NOFAIL);
+ v = kmem_cache_alloc(vproc_cachep, GFP_KERNEL);
+ if (v == NULL)
+ return NULL;
#ifndef VPROC_HASH_LIST
#error not supported
#endif
@@ -227,8 +229,8 @@
{
struct vproc *v;
- v = vproc_new();
- dpvproc_struct_init(v);
+ if ((v = vproc_new()))
+ dpvproc_struct_init(v);
return(v);
}
Index: dvp_lock.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/dvp_lock.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- dvp_lock.c 6 Jan 2010 17:32:26 -0000 1.8
+++ dvp_lock.c 2 Feb 2010 05:00:49 -0000 1.9
@@ -75,7 +75,6 @@
INIT_COND_LOCK(&mlp->ml_lock);
INIT_CONDITION(&mlp->ml_shr_cond);
INIT_CONDITION(&mlp->ml_excl_cond);
- mlp->ml_flag = 0;
}
void
Index: dvp_init.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/dvp_init.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- dvp_init.c 2 Feb 2010 04:32:42 -0000 1.18
+++ dvp_init.c 2 Feb 2010 05:00:49 -0000 1.19
@@ -343,7 +343,7 @@
* sleep, so dpvproc_struct_init() should not be called
* with spin locks held.
*/
-#if __SSI_LOCK_DEBUG || !defined(VPROC_KMEM_CACHE)
+#if __SSI_LOCK_DEBUG
VPROC_LOCK_INIT(v);
VPROC_LOCK_ND_LIST_INIT(v);
VPROC_LOCK_PGRP_LIST_INIT(v);
@@ -351,7 +351,8 @@
VPROC_LOCK_FLAG_INIT(v);
VPROC_HOLD_MOVEMENT_INIT(v);
VPROC_WAIT_EVENT_INIT(v);
-#else
+#endif
+#ifdef VPROC_KMEM_CACHE
/* TODO: Create macros for these... */
pvp->pvp_movement_lock.ml_flag = 0;
pvp->pvp_movement_lock.ml_shr_count = 0;
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com