lkml.org 
[lkml]   [1999]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RasterMan on linux and threads
On 17 Dec, Richard Gooch scribbled:
-> raster@rasterman.com writes:
-> > ->
-> > ->
-> > -> On Fri, Dec 17, 1999 at 09:53:38AM +0100, Borek Lupomesky wrote:
-> > -> > -----BEGIN PGP SIGNED MESSAGE-----
-> > -> > Hash: SHA1
-> > -> >
-> > -> > On Fri, 17 Dec 1999 jgarzik@mandrakesoft.com wrote:
-> > -> >
-> > -> > > Also threads right now under linux all run on the same processor so
-> > -> > > under linux there is NO speed advantage to threads. You just end up
-> > -> >
-> > -> > Is it really so?
-> > ->
-> > -> Nope. He just doesn't know anything about scheduling (or threading).
-> >
-> > actually - u'd be surprised. i spent many years writing my own
-> > scheduling in 68k asm on he amiga (first sys call was forbid(); last
-> > one before exitign as permit(); - inside that time i took over the
-> > system and thus if i anted processes or threads i had to do them
-> > myseufl). my unerstanding as the kernel scheduled threads on the
-> > same processor to retain cache coherency for more efficiency - so
-> > you have a process that's just memeory/numeber crunching it doesn't
-> > help much in that case - you just spend time context switching and
-> > you dont take advantage of idle cpu.
->
-> No, the scheduler gives a bonus to tasks with the same MM context
-> (i.e. threads) being scheduled on the same CPU. IOW when deciding
-> which task to schedule, one with the same MM context is given a small
-> bonus. Last time I looked, the bonus was 3 timer ticks (== 3 dynamic
-> priority levels).
->
-> But it's merely a bonus (designed to improve cache affinity). It
-> doesn't mean threads are locked to the same CPU.

hmm - so if i do short bursted threads ( approx < 0.1 seconds each on
average i guess ) will he get scheduled across spuc or be weighted to
remain on the same cu due to MM afinity (whihc is why i'd use therads
since they will share memeory space and MM affinity heavily) - so will
hey get scheduled across cpu's - i asked san mehat about this and he
sugsted tey'd end up all being scheduled on the same cpu - giving no
speedup ?

--
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
The Rasterman (Carsten Haitzler) raster@rasterman.com raster@valinux.com
raster@enlightenment.org raster@linux.com
raster@zip.com.au


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.103 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site