From owner-freebsd-smp Mon Jun 26 19:55:41 2000 Delivered-To: freebsd-smp@freebsd.org Received: from magnesium.net (toxic.magnesium.net [207.154.84.15]) by hub.freebsd.org (Postfix) with SMTP id 78DF437BDC7 for ; Mon, 26 Jun 2000 19:55:36 -0700 (PDT) (envelope-from jasone@magnesium.net) Received: (qmail 81511 invoked by uid 1142); 27 Jun 2000 02:55:34 -0000 Date: 26 Jun 2000 19:55:34 -0700 Date: Mon, 26 Jun 2000 19:55:26 -0700 From: Jason Evans To: Luoqi Chen Cc: eischen@vigrid.com, smp@FreeBSD.ORG Subject: Re: SMP meeting summary Message-ID: <20000626195526.D15267@blitz.canonware.com> References: <200006270214.e5R2Exu13573@lor.watermarkgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200006270214.e5R2Exu13573@lor.watermarkgroup.com>; from luoqi@watermarkgroup.com on Mon, Jun 26, 2000 at 10:14:59PM -0400 Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, Jun 26, 2000 at 10:14:59PM -0400, Luoqi Chen wrote: > > 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. There only needs to be one turnstile per entity (process/thread) that can block. Putting one in every mutex would actually require much more space. Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message