[SSI] openssi/kernel/cluster/ssi/vproc dvp_pvpops.c, 1.44, 1.45 dvp_vpops.c, 1.43, 1.44 rproc_svr_pproc.c, 1.28, 1.29
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-serv13296/cluster/ssi/vproc
Modified Files:
Tag: OPENSSI-FC
dvp_pvpops.c dvp_vpops.c rproc_svr_pproc.c
Log Message:
* VPROC:
- Optimize away struct procinfo initialization in error path in
kill_proc_info().
- Optimize away error code initialization for remote path in various
pvpop_xxx() functions.
- Fix missing comment to explain why task state needs to be preserved
in vpop_report_state().
- Regression:
- Sending SIGSTOP to remote process does not change state of process
to stopped when its parent process is on another node. When parent
is remote the state is reset to sleeping after traversing
finish_stop(). Fixed by re-enabling code to preserve current task
state in vpop_report_state().
* Files in ci-linux project were modified (see ci/ChangeLog).
cluster/ssi/vproc/dvp_pvpops.c | 49 ++++++++++++----------------
cluster/ssi/vproc/dvp_vpops.c | 26 ++++++++------
cluster/ssi/vproc/rproc_svr_pproc.c | 1
kernel/exit.c | 2 -
4 files changed, 39 insertions(+), 39 deletions(-)
Index: dvp_vpops.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/dvp_vpops.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- dvp_vpops.c 17 Dec 2009 05:46:50 -0000 1.43
+++ dvp_vpops.c 2 Feb 2010 04:21:59 -0000 1.44
@@ -1627,9 +1627,7 @@
register int old_state, new_state;
int error = 0;
int held = VPROC_LOCK_EXCL_HELD(v);
-#ifndef VPROC_CONTINUE
long current_state = current->state;
-#endif
if (!local_only) {
if (!held) {
@@ -1645,10 +1643,11 @@
}
if ((PVP(v)->pvp_wstate == PVWS_SZOMB) &&
(state != VPROC_ZOMBIE)) {
-#ifndef VPROC_CONTINUE
- /* SSI_XXX: what is this for? */
- set_current_state(current_state);
-#endif
+ /*
+ * current->state could be tainted if we slept.
+ */
+ if (current->state != current_state)
+ set_current_state(current_state);
if (!held)
VPROC_UNLOCK_EXCL(v, "vpop_report_state");
return 0;
@@ -1726,10 +1725,11 @@
SSI_ASSERT(vp != NULL);
error = PVPOP_REPORT_STATE(vp, v, &sig, pinfo, state);
VPROC_RELE(vp, "vpop_report_state");
-#ifndef VPROC_CONTINUE
- /* SSI_XXX: what is this for? */
- set_current_state(current_state);
-#endif
+ /*
+ * current->state could be tainted if we slept.
+ */
+ if (current->state != current_state)
+ set_current_state(current_state);
/*
* Even if SIGCHLD is not generated, we must wake up wait4 calls.
@@ -1794,7 +1794,11 @@
} else
#endif /* VPROC_CONTINUE_SIGCHLD */
error = PVPOP_REPORT_STATE(vp, v, &sig, pinfo, state);
- /* set_current_state(current_state); */
+ /*
+ * current->state could be tainted if we slept.
+ */
+ if (current->state != current_state)
+ set_current_state(current_state);
}
if (state == VPROC_ZOMBIE) {
if (unlikely(!vp || error)) {
Index: rproc_svr_pproc.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/rproc_svr_pproc.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- rproc_svr_pproc.c 17 Dec 2009 06:43:51 -0000 1.28
+++ rproc_svr_pproc.c 2 Feb 2010 04:21:59 -0000 1.29
@@ -127,6 +127,7 @@
list_splice(&p.list, &pp->list);
pp->signal = p.signal;
}
+ rmb();
pp = &t->signal->shared_pending;
flush_sigqueue(pp);
if (!list_empty(&sp.list)) {
Index: dvp_pvpops.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/dvp_pvpops.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- dvp_pvpops.c 17 Dec 2009 06:43:51 -0000 1.44
+++ dvp_pvpops.c 2 Feb 2010 04:21:59 -0000 1.45
@@ -590,7 +590,7 @@
struct vproc *w;
#endif /* !VPROC_PVP_CHILD_LL */
#endif /* VPROC_ND */
- int error = 0;
+ int error;
int ret;
int held = VPROC_LOCK_EXCL_HELD(pp);
@@ -721,7 +721,7 @@
register struct pvproc *pwp;
#endif
struct rpvpop_args rargs;
- int ret, error = 0;
+ int ret, error;
#ifdef VPROC_RW_LOCK
int held = islocked && VPROC_LOCK_EXCL_HELD(pp);
#endif
@@ -887,8 +887,7 @@
register struct vproc *vi = VPROCPTR(1);
struct rpvpop_args rargs;
int wstate, waited;
- int error = 0;
- int skip = 0;
+ int error, skip = 0;
int ret;
/* If init hasn't been spawned yet we must be using process
@@ -1141,8 +1140,7 @@
struct vproc *vi, *vp = NULL;
struct rpvpop_args rargs;
int wstate, waited;
- int error = 0;
- int ret;
+ int error, ret;
int held = VPROC_LOCK_EXCL_HELD(v);
#ifdef VPROC_RW_LOCK
int pp_held, exlock = 0;
@@ -1415,9 +1413,9 @@
pid_t group_sid;
int group_jobc;
int is_pgrpldr;
- int ret, error = 0;
+ int ret, error;
#ifdef VPROC_RW_LOCK
- int exlock = 0;
+ int exlock;
#endif
/*
@@ -1443,6 +1441,7 @@
*/
#ifdef VPROC_RW_LOCK
+ exlock = 0;
recheck:
if (exlock)
VPROC_LOCK_EXCL(v, "pvpop_setpgid(process)");
@@ -1712,7 +1711,7 @@
register struct pvproc *pvp = PVP(v);
struct rpvpop_args rargs;
int false = FALSE;
- int ret, error = 0;
+ int ret, error;
/*
* Take the movement lock to prevent migration while this
@@ -1930,8 +1929,7 @@
{
struct rpvpop_args rargs;
- int error = 0;
- int ret;
+ int error, ret;
#ifdef CONFIG_VPROC_ND
struct vproc *w; /* group member pointer */
#endif /* VPROC_ND */
@@ -2056,7 +2054,7 @@
{
register struct vproc *s;
struct rpvpop_args rargs;
- int ret, error = 0;
+ int ret, error;
register struct vproc *w;
/* #ifdef DEBUG
@@ -2247,8 +2245,7 @@
struct vproc *g) /* vproc of group leader being added to sess */
{
struct rpvpop_args rargs;
- int error = 0;
- int ret;
+ int error, ret;
#ifdef CONFIG_VPROC_ND
struct vproc *w;
#endif /* VPROC_ND */
@@ -2336,7 +2333,7 @@
{
register struct vproc *w;
struct rpvpop_args rargs;
- int ret, error = 0;
+ int ret, error;
/*
* Take the movement lock to prevent migration while this
@@ -2848,7 +2845,7 @@
struct pvproc *pvp = PVP(vto);
struct rpvpop_args rargs;
int sig_sent = FALSE;
- int ret, error = -ESRCH;
+ int ret, error;
/*
* Take the movement lock to prevent migration while this
@@ -2900,6 +2897,8 @@
* Perform operation locally.
*/
+ error = -ESRCH;
+
/*
* If delivery is conditional on stopped state,
* return error if process not stopped.
@@ -3115,7 +3114,7 @@
int state) /* zombie or stop or unstop */
{
struct rpvpop_args rargs;
- int ret, error = 0;
+ int ret, error;
int sig = *sigp;
struct sighand_struct *psig;
#ifdef VPROC_SIGNAL_LOCK
@@ -3894,8 +3893,7 @@
struct pvproc *pvp = PVP(v);
struct __user_cap_data_struct data;
struct rpvpop_args rargs;
- int ret;
- int error = 0;
+ int ret, error;
int pidlocal;
/*
@@ -3947,7 +3945,7 @@
goto out;
}
#endif
-
+ error = 0;
pidlocal = (v->vp_pid == lock_pid);
PVPSOP_CAPABILITY_LOCK_NODE(this_node, lock_pid, pidlocal);
@@ -3971,8 +3969,7 @@
pvpop_add_to_originalchild_list(struct vproc *vp, struct vproc *vc)
{
struct rpvpop_args rargs;
- int error = 0;
- int ret;
+ int error, ret;
int held = VPROC_LOCK_EXCL_HELD(vp);
/*
@@ -4033,8 +4030,7 @@
{
struct vproc *w;
struct rpvpop_args rargs;
- int error = 0;
- int ret;
+ int error, ret;
int held = VPROC_LOCK_EXCL_HELD(vp);
/*
@@ -4193,8 +4189,7 @@
{
struct pvproc *pvp = PVP(v);
struct rpvpop_args rargs;
- int ret = 0;
- int error = 0;
+ int ret, error;
/*
* Take the movement lock to prevent migration while this
@@ -4893,7 +4888,7 @@
{
struct rpvpop_args rargs;
ssi_procstate_t pstate;
- int ret = 0, error;
+ int ret, error;
/*
* Take the movement lock to prevent migration while this
------------------------------------------------------------------------------
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