[patch 2/4] openmosix/fix-migrating-status.patch fix migrating status

Florian Delizy <[email protected]> Thu, 16 Nov 2006 23:10:46 +0100
Newsgroups gmane.linux.cluster.openmosix.devel
Message-ID <[email protected]>
Nobody noticed, but actually, the test was wrong for checking if the process
was (or not) migrating in proc_pid_get_where. The test I initially wrote was
'if (task_test_dreqs(current, DREQ_MOVE))' which was obviously always 
false,
since the process (current) intiating the proc read was the shell, not the
process we were looking for !!

Well, this is fixed now :)

Now the "where" file will report :

"home" -> "queued" -> "migrating" -> "dest_ip"

queued means that the process is currently executing kernel code (or 
waiting
on a ressource), and will be migrated on resume to usermode.

"migrating" means, "the process is being sent threw network to the dest ip"

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
openMosix-devel mailing list
openMosix-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/openmosix-devel
fix-migrating-status.patch (text/x-patch, 1012 B)
Subject: [patch @num@/@total@] @name@ fix migrating status

Nobody noticed, but actually, the test was wrong for checking if the process
was (or not) migrating in proc_pid_get_where. The test I initially wrote was
'if (task_test_dreqs(current, DREQ_MOVE))' which was obviously always false, 
since the process (current) intiating the proc read was the shell, not the 
process we were looking for !!

Well, this is fixed now :)

Index: linux/hpc/proc.c
===================================================================
--- linux.orig/hpc/proc.c	2006-11-15 19:39:08.000000000 +0100
+++ linux/hpc/proc.c	2006-11-16 21:52:26.000000000 +0100
@@ -114,7 +114,9 @@
 	struct sockaddr_in *saddr;
 	unsigned int addr;
 
-	if (task_test_dreqs(current, DREQ_MOVE)) {
+	if (task_test_dreqs(p, DREQ_MOVE)) {
+		length = sprintf(buf, "queued\n");
+	} else if(task_test_dflags(p, DPASSING)) {
 		length = sprintf(buf, "migrating\n");
 	} else if (task_test_dflags(p, DMIGRATED)) {
 		saddr=(struct sockaddr_in *)p->om.whereto;