Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2000 22:14:59 -0400 (EDT)
From:      Luoqi Chen <luoqi@watermarkgroup.com>
To:        eischen@vigrid.com
Cc:        smp@FreeBSD.ORG
Subject:   Re: SMP meeting summary
Message-ID:  <200006270214.e5R2Exu13573@lor.watermarkgroup.com>

next in thread | raw e-mail | index | archive | help
> In regards to turnstiles, each kernel thread is born with its own
> turnstile.  When it blocks on a mutex that doesn't have any waiters
> (no turnstile allocated to it), it uses the threads turnstile.  If
> the mutex already has a turnstile (there are other waiters), then
> the threads turnstile is added to the system (per-CPU?) pool of
> turnstiles.  When the thread wakes up and acquires the mutex, it
> takes a turnstile back from the turnstile pool.  Turnstiles are
> also used for read/write locks.
> 
> -- 
> Dan Eischen
> 
Does anyone know why a turnstile structure is used, instead of a sleep
queue embedded in the mutex structure? With cache line size of 16/32
bytes, the latter seems to be more advantageous.

-lq


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006270214.e5R2Exu13573>