Skip site navigation (1)Skip section navigation (2)
From:      Rik van Riel <riel@conectiva.com.br>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        "Bill Huey (Hui)" <billh@gnuppy.monkey.org>, Julian Elischer <julian@elischer.org>, <freebsd-arch@freebsd.org>
Subject:   Re: New Linux threading model
Message-ID:  <Pine.LNX.4.44L.0209202254280.1857-100000@imladris.surriel.com>
In-Reply-To: <3D8BBFFD.E1CDEAD5@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 20 Sep 2002, Terry Lambert wrote:

> In the design I'm talking about, there are is only a single lock,
> and that lock is on a migration queue, into which you *push*
> entries.  This is different from both the Linux scheduler, and the
> current FreeBSD scheduler, and the current FreeBSD scheduler with
> Alfred's old (last year) affinity patches applied.

Very nice design, IF the cost of contention is higher than
the cost of having CPUs sit idle until the next rescheduling
happens on one of the busier CPUs...

Say that you have a moderately loaded box with, on average,
about as many runnable tasks as you have CPUs. These tasks
will, due to statistics, not always be evenly distributed
across CPUs.

Say that distribution is near-perfect and this results in
only 1% CPU idle time.

Your scheme would win ONLY if the lock contention in the
pull model is responsible for more than that 1% CPU time.

If we can keep the CPUs busier by pulling tasks onto idle
CPUs and the locking overhead is less than 1%, it's a win.

regards,

Rik
-- 
Bravely reimplemented by the knights who say "NIH".

http://www.surriel.com/		http://distro.conectiva.com/

Spamtraps of the month:  september@surriel.com trac@trac.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.44L.0209202254280.1857-100000>