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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, 19 Sep 2007, Ingo Molnar wrote:
> 
> Linus, what do you think? I have no strong feelings, I think the patch 
> cannot hurt (it does not change anything by default) - but we should not 
> turn the workaround flag on by default.

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux