Re: CFS: some bad numbers with Java/database threading [FIXED]

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Wednesday, September 19, 2007 - 12:39 pm

On Wed, 19 Sep 2007, Ingo Molnar wrote:

I disagree. I think CFS made "sched_yield()" worse, and what you call "bug 
workaround" is likely the *better* behaviour.

The fact is, sched_yield() is not - and should not be - about 
"recalculating the position in the scheduler queue" like you do now in 
CFS.

It very much is about moving the thread *dead last* within its priority 
group. 

That's what it does for round-robin, and it's not about fairness, it's 
about

 - Opengroup:

	DESCRIPTION

	    The sched_yield() function forces the running thread to 
	relinquish the processor until it again becomes the head of its 
	thread list. It takes no arguments.

 - Linux man-page:

	DESCRIPTION

	    A process can relinquish the processor voluntarily without 
	blocking by calling sched_yield.  The process will then be moved 
	to the end of the queue for its static priority and a new process 
	gets to run.

and quite frankly, the current CFS behaviour simply looks buggy. It should 
simply not move it to the "right place" in the rbtree. It should move it 
*last*.

			Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
CFS: some bad numbers with Java/database threading, Antoine Martin, (Wed Sep 12, 4:10 pm)
Re: some bad numbers with Java/database threading, Nick Piggin, (Wed Sep 12, 4:33 pm)
RE: some bad numbers with Java/database threading, David Schwartz, (Thu Sep 13, 12:18 am)
Re: CFS: some bad numbers with Java/database threading, Ingo Molnar, (Thu Sep 13, 4:24 am)
Re: some bad numbers with Java/database threading, Antoine Martin, (Thu Sep 13, 12:02 pm)
RE: some bad numbers with Java/database threading, David Schwartz, (Thu Sep 13, 2:47 pm)
Re: CFS: some bad numbers with Java/database threading, Ingo Molnar, (Fri Sep 14, 1:32 am)
Re: CFS: some bad numbers with Java/database threading, Satyam Sharma, (Fri Sep 14, 3:06 am)
Re: CFS: some bad numbers with Java/database threading, Satyam Sharma, (Fri Sep 14, 9:01 am)
Re: CFS: some bad numbers with Java/database threading, Satyam Sharma, (Fri Sep 14, 9:08 am)
Re: CFS: some bad numbers with Java/database threading, Antoine Martin, (Mon Sep 17, 5:17 am)
Re: CFS: some bad numbers with Java/database threading [FIXED], Linus Torvalds, (Wed Sep 19, 12:39 pm)
Re: CFS: new java yield graphs, Antoine Martin, (Tue Sep 25, 6:46 pm)
Re: CFS: new java yield graphs, Ingo Molnar, (Thu Sep 27, 1:35 am)