[patch 36/56] openmosix/openmosix-allow-migration-on-syscall-careful-return.patch

Florian Delizy <[email protected]> Thu, 02 Nov 2006 22:56:55 +0100
Newsgroups gmane.linux.cluster.openmosix.devel
Message-ID <[email protected]>
[patch 36/56] 
openmosix/openmosix-allow-migration-on-syscall-careful-return.patch 
sysret_carefull hook

This patch allow a process to migrate on the return of a syscall
since for now openmosix is hijacking the TIF_NEEDRESCHED for it's
own purpose, the call to openmosix_pre_usermode must be called
before any schedule() call (since schedule() would clear the
TIF_NEEDRESCHED flag ... )

This patch is already present on tab's git repository (thanks tab)

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
openMosix-devel mailing list
openMosix-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/openmosix-devel
(unnamed) (text/x-patch, 905 B)
[patch @num@/@total@] @name@ sysret_carefull hook

This patch allow a process to migrate on the return of a syscall
since for now openmosix is hijacking the TIF_NEEDRESCHED for it's
own purpose, the call to openmosix_pre_usermode must be called
before any schedule() call (since schedule() would clear the
TIF_NEEDRESCHED flag ... )

This patch is already present on tab's git repository (thanks tab)

Index: linux/arch/x86_64/kernel/entry.S
===================================================================
--- linux.orig/arch/x86_64/kernel/entry.S	2006-11-02 22:52:21.000000000 +0100
+++ linux/arch/x86_64/kernel/entry.S	2006-11-02 22:52:28.000000000 +0100
@@ -270,6 +270,13 @@
 	call schedule
 	popq  %rdi
 	CFI_ADJUST_CFA_OFFSET -8
+#ifdef CONFIG_OPENMOSIX
+	cli
+	SAVE_REST
+	call openmosix_pre_usermode
+	RESTORE_REST
+#endif /* CONFIG_OPENMOSIX */
+
 	jmp sysret_check
 
 	/* Handle a signal */