[m-rev.] diff: change MR_fork_globally_criteria

Peter Wang wangp at students.csse.unimelb.edu.au
Tue Oct 31 14:03:59 AEDT 2006


Estimated hours taken: 0.5
Branches: main

runtime/mercury_context.h:
	Change MR_fork_globally_criteria to not consider the number of idle
	engines when deciding whether to place a new spark on the global spark
	queue or a local spark stack.  I found this works better and it's what
	I wrote in my thesis :-)

	Remove an out-of-date comment for MR_fork_new_child.

Index: runtime/mercury_context.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_context.h,v
retrieving revision 1.34
diff -u -r1.34 mercury_context.h
--- runtime/mercury_context.h	11 Oct 2006 22:42:09 -0000	1.34
+++ runtime/mercury_context.h	31 Oct 2006 02:55:45 -0000
@@ -355,9 +355,8 @@
   /*
   ** fork_new_child(MR_Code *child);
   ** create a new spark to execute the code at `child'.  The new spark is put
-  ** on the global spark queue or the context-local spark stack.  The current
-  ** context resumes at `parent'.  MR_parent_sp must already be set
-  ** appropriately before this instruction is executed.
+  ** on the global spark queue or the context-local spark stack.  MR_parent_sp
+  ** must already be set appropriately before this instruction is executed.
   */
   #define MR_fork_new_child(child)                              \
     do {                                                        \
@@ -374,8 +373,7 @@
     } while (0)
 
   #define MR_fork_globally_criteria                             \
-    (MR_num_idle_engines != 0 &&                                \
-    MR_num_outstanding_contexts_and_sparks < MR_max_outstanding_contexts)
+    (MR_num_outstanding_contexts_and_sparks < MR_max_outstanding_contexts)
 
   #define MR_schedule_spark_locally(spark)                              \
     do {                                                                \
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list