From owner-freebsd-arch Wed May 24 19:28: 8 2000 Delivered-To: freebsd-arch@freebsd.org Received: from berserker.bsdi.com (berserker.twistedbit.com [199.79.183.1]) by hub.freebsd.org (Postfix) with ESMTP id 1735C37B83B for ; Wed, 24 May 2000 19:28:06 -0700 (PDT) (envelope-from cp@berserker.bsdi.com) Received: from berserker.bsdi.com (cp@[127.0.0.1]) by berserker.bsdi.com (8.9.3/8.9.3) with ESMTP id UAA16415; Wed, 24 May 2000 20:28:00 -0600 (MDT) Message-Id: <200005250228.UAA16415@berserker.bsdi.com> To: Matthew Dillon Cc: Terry Lambert , arch@freebsd.org Subject: Re: Preemptive kernel on older X86 hardware From: Chuck Paterson Date: Wed, 24 May 2000 20:28:00 -0600 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG We are seeing 30 clock ticks for a locked mutex operation. Only 10 if you take out the lock for UP systems. (hopefully I did the math right.) I just don't see how putting a function call is going to be cheap relatively. Is it possible that you are hitting so many spin locks that the function calltime gets burried. Chuck ----- Begin Included Message ----- Date: Wed, 24 May 2000 19:08:00 -0700 From: Matthew Dillon To: Chuck Paterson Subject: Re: Preemptive kernel on older X86 hardware cc: Terry Lambert , arch@FreeBSD.ORG We've had very good luck encapsulating our MP lock code in real honest-to-god subroutines rather then trying to make them inline macros. On intel anyway, subroutine calls are *cheap*, especially compared to the overhead of a locked instruction or even an L1 cache miss. It's a no-brainer. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message ----- End Included Message ----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message