This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gij/eclipse sets SCHED_RR scheduling policy, hogs machine.


For some bizarre reason we're setting SCHED_RR when we do
java::lang::Thread::setPriority ().  I cannot begin to imagine why
anyone ever thought this might be a good idea.

See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=152386 for
all the gory details.

Andrew.


2005-06-29  Andrew Haley  <aph@redhat.com>

	* posix-threads.cc (_Jv_ThreadSetPriority): Use SCHED_OTHER
	(regular, non-realtime scheduling), not SCHED_RR (realtime,
	round-robin).
	
Index: posix-threads.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/posix-threads.cc,v
retrieving revision 1.36
diff -u -p -r1.36 posix-threads.cc
--- posix-threads.cc	16 Feb 2005 04:16:06 -0000	1.36
+++ posix-threads.cc	29 Jun 2005 10:55:06 -0000
@@ -343,7 +343,7 @@ _Jv_ThreadSetPriority (_Jv_Thread_t *dat
       struct sched_param param;
 
       param.sched_priority = prio;
-      pthread_setschedparam (data->thread, SCHED_RR, &param);
+      pthread_setschedparam (data->thread, SCHED_OTHER, &param);
     }
 #endif
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]