login
Header Space

 
 

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

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Chuck Ebbert <cebbert@...>, Antoine Martin <antoine@...>, Satyam Sharma <satyam.sharma@...>, Linux Kernel Development <linux-kernel@...>, Peter Zijlstra <a.p.zijlstra@...>
Date: Wednesday, September 19, 2007 - 3:56 pm

* Linus Torvalds <torvalds@linux-foundation.org> wrote:

[...]

ok, we can do that.

the O(1) implementation of yield() was pretty arbitrary: it did not move 
it last on the same priority level - it only did it within the active 
array. So expired tasks (such as CPU hogs) would come _after_ a 
yield()-ing task.

so the yield() implementation was so much tied to the data structures of 
the O(1) scheduler that it was impossible to fully emulate it in CFS.

in CFS we dont have a per-nice-level rbtree, so we cannot move it dead 
last within the same priority group - but we can move it dead last in 
the whole tree. (then they'd be put even after nice +19 tasks.) People 
might complain about _that_.

another practical problem is that this will break certain desktop apps 
that do calls to yield() [some firefox plugins do that, some 3D apps do 
that, etc.] but they dont expect to be moved 'very late' into the queue 
- they expect the O(1) scheduler's behavior of being delayed "a bit". 
(That's why i added the yield-granularity tunable.)

we can make yield super-agressive, that is pretty much the only sane 
(because well-defined) thing to do (besides turning yield into a NOP), 
but there will be lots of regression reports about lost interactivity 
during load. sched_yield() is a mortally broken API. "fix the app" would 
be the answer, but still there will be lots of complaints.

	Ingo
-
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, 7:10 pm)
Re: CFS: some bad numbers with Java/database threading, Ingo Molnar, (Thu Sep 13, 7:24 am)
Re: CFS: some bad numbers with Java/database threading, Ingo Molnar, (Fri Sep 14, 4:32 am)
Re: CFS: some bad numbers with Java/database threading, Satyam Sharma, (Fri Sep 14, 6:06 am)
Re: CFS: some bad numbers with Java/database threading, Satyam Sharma, (Fri Sep 14, 12:01 pm)
Re: CFS: some bad numbers with Java/database threading, Antoine Martin, (Mon Sep 17, 8:17 am)
Re: CFS: some bad numbers with Java/database threading, Satyam Sharma, (Fri Sep 14, 12:08 pm)
Re: CFS: some bad numbers with Java/database threading [FIXED], Ingo Molnar, (Wed Sep 19, 3:56 pm)
Re: CFS: new java yield graphs, Antoine Martin, (Tue Sep 25, 9:46 pm)
Re: CFS: new java yield graphs, Ingo Molnar, (Thu Sep 27, 4:35 am)
RE: some bad numbers with Java/database threading, David Schwartz, (Thu Sep 13, 3:18 am)
Re: some bad numbers with Java/database threading, Nick Piggin, (Wed Sep 12, 7:33 pm)
Re: some bad numbers with Java/database threading, Antoine Martin, (Thu Sep 13, 3:02 pm)
RE: some bad numbers with Java/database threading, David Schwartz, (Thu Sep 13, 5:47 pm)
speck-geostationary