[SSI] openssi/kernel/cluster/ssi/vproc dvp_vpops.c,1.44,1.45
Roger Tsang <[email protected]> Sun, 21 Mar 2010 05:25:11 +0000
| 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-serv19697/kernel/cluster/ssi/vproc
Modified Files:
Tag: OPENSSI-FC
dvp_vpops.c
Log Message:
- Move vproc_alloc() outside VPROC_LOCK_EXCL() in vpop_setup_vproc_relations(). Shrink critical section.
Index: dvp_vpops.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/dvp_vpops.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- dvp_vpops.c 2 Feb 2010 04:21:59 -0000 1.44
+++ dvp_vpops.c 21 Mar 2010 05:25:09 -0000 1.45
@@ -310,6 +310,14 @@
return -EINVAL;
}
+ /* allocate a vproc for the child and zeroize its pvproc */
+ if ((vc = vproc_alloc()) == NULL) {
+#ifdef DEBUG
+ printk(KERN_WARNING "vpop_fork: vproc_alloc failed\n");
+#endif /* DEBUG */
+ return -ENOMEM;
+ }
+
/*
* Seize the vproc during the fork operation. We must prevent
* anyone from changing the parent's process group id during
@@ -332,23 +340,16 @@
error = dvp_child_join_pgrp_setup(pp, &parent_seqno, vp_flags);
if (error) {
#ifdef DEBUG
- printk(KERN_WARNING "vpop_fork: join pgrp setup failed %d\n", error);
+ printk(KERN_WARNING "vpop_fork: join pgrp setup "
+ "failed %d\n", error);
#endif /* DEBUG */
+ VPROC_RELE(vc, "vpop_fork");
goto out; /* -ERESTARTNOINTR a distinct possiblilty */
}
}
pvp = PVP(pp);
- /* allocate a vproc for the child and zeroize its pvproc */
- if ((vc = vproc_alloc()) == NULL) {
-#ifdef DEBUG
- printk(KERN_WARNING "vpop_fork: vproc_alloc failed\n");
-#endif /* DEBUG */
- error = -ENOMEM;
- goto out;
- }
-
pvc = PVP(vc);
pvc->pvp_flag |= PV_PROCESS|
PV_IS_ORIGIN|
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev