From owner-freebsd-smp Mon Jun 28 3:57: 7 1999 Delivered-To: freebsd-smp@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id 6C4AD14DCA for ; Mon, 28 Jun 1999 03:57:01 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 8E8F582; Mon, 28 Jun 1999 18:56:59 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.0.2 2/24/98 To: Alan Cox Cc: Terry Lambert , Bakul Shah , julian@whistle.com, dillon@apollo.backplane.com, freebsd-smp@freebsd.org Subject: Re: high-efficiency SMP locks - submission for review In-reply-to: Your message of "Mon, 28 Jun 1999 00:36:39 EST." <19990628003639.N2738@cs.rice.edu> Date: Mon, 28 Jun 1999 18:56:59 +0800 From: Peter Wemm Message-Id: <19990628105659.8E8F582@overcee.netplex.com.au> Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Alan Cox wrote: > On Mon, Jun 28, 1999 at 05:21:05AM +0000, Terry Lambert wrote: > > > > I also have a slight problem with relying on a test-and-set > > instruction any more complicated than that which can be > > implemented with P/V semaphores. Many processors (e.g. MIPS) > > don't have an atomic test and set, and you'd want to avoid > > architecting against them ever working. 8-(. > > > > That is true. They, including MIPS and Alpha, have something > better: Load-locked and store conditional. :-) > > I think this is a non-issue. > > Alan Actually, I have a bigger issue with it.. cmpxchgl etc doesn't exist on all x86 cpus. To make a kernel that boots on the current cpus (including the 486) we either have to conditionalize the inlines or use the universally available (and implicitly locked) xchg instruction - but that's a test-and-set style operation rather than atomic_cmpex. Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message